How to specify dismax related parameters like qf

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to specify dismax related parameters like qf

AJAX DoneBy Jack
Hello Basho,

I am very new on Riak Search, I know can add {!dismax}before query string to use it, but don't know how to specify qf or other dismax related parameters in Riak Java Client. Could you advise?

Thanks,
Ajax 

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: How to specify dismax related parameters like qf

Magnus Kessler
On 14 October 2016 at 20:18, AJAX DoneBy Jack <[hidden email]> wrote:
Hello Basho,

I am very new on Riak Search, I know can add {!dismax}before query string to use it, but don't know how to specify qf or other dismax related parameters in Riak Java Client. Could you advise?

Thanks,
Ajax

Hi Ajax,

The Riak Java Client, as most other Riak clients, uses the Protocol Buffer API to communicate with Riak. Yokozuna's implementation of the Protocol Buffer API allows only for a small set of query parameters [0], which have been chosen to support the standard query parser. As such, there is currently no easy way to use the extended set of query parameters through the java api.

However, you may have better luck if you talk directly to HTTP API, exposed at http://<node>:8098/search/query/<index_name>. This will accept all queries supported by Solr 4.7. Please be aware, though, that some query results that require accumulating data from all Solr nodes (such as stats queries), may not work as expected. Yokozuna constructs a new coverage query very frequently, and the actual results returned depend on which nodes are chosen in this query.

Kind Regards,

Magnus


 

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com




--
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: How to specify dismax related parameters like qf

AJAX DoneBy Jack
Hi Magnus,

So you suggest to use http API right? That day I were thinking query the internal Solr http by sending request. Could you advise what's the difference between Riak http API and internal Solr http API? What's the pros and cons to use them?

Thanks,
Ajax

On Monday, 17 October 2016, Magnus Kessler <[hidden email]> wrote:
On 14 October 2016 at 20:18, AJAX DoneBy Jack <<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;ajaxdone@gmail.com&#39;);" target="_blank">ajaxdone@...> wrote:
Hello Basho,

I am very new on Riak Search, I know can add {!dismax}before query string to use it, but don't know how to specify qf or other dismax related parameters in Riak Java Client. Could you advise?

Thanks,
Ajax

Hi Ajax,

The Riak Java Client, as most other Riak clients, uses the Protocol Buffer API to communicate with Riak. Yokozuna's implementation of the Protocol Buffer API allows only for a small set of query parameters [0], which have been chosen to support the standard query parser. As such, there is currently no easy way to use the extended set of query parameters through the java api.

However, you may have better luck if you talk directly to HTTP API, exposed at http://<node>:8098/search/query/<index_name>. This will accept all queries supported by Solr 4.7. Please be aware, though, that some query results that require accumulating data from all Solr nodes (such as stats queries), may not work as expected. Yokozuna constructs a new coverage query very frequently, and the actual results returned depend on which nodes are chosen in this query.

Kind Regards,

Magnus


 

_______________________________________________
riak-users mailing list
<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;riak-users@lists.basho.com&#39;);" target="_blank">riak-users@...
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com




--
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: How to specify dismax related parameters like qf

Fred Dushin
The internal solr API will not use the distributed queries generated from coverage plans.  You will only get results from the local node.  Theoretically, you could aggregate and de-duplicate across multiple nodes, but that would result in more data movement than necessary, as it does not leverage the "r=1" behavior you get from cover sets and which you get automatically from the Riak HTTP API.

-Fred

On Oct 17, 2016, at 10:17 AM, AJAX DoneBy Jack <[hidden email]> wrote:

Hi Magnus,

So you suggest to use http API right? That day I were thinking query the internal Solr http by sending request. Could you advise what's the difference between Riak http API and internal Solr http API? What's the pros and cons to use them?

Thanks,
Ajax

On Monday, 17 October 2016, Magnus Kessler <[hidden email]> wrote:
On 14 October 2016 at 20:18, AJAX DoneBy Jack <<a href="javascript:_e(%7B%7D,'cvml','ajaxdone@gmail.com');" target="_blank" class="">ajaxdone@...> wrote:
Hello Basho,

I am very new on Riak Search, I know can add {!dismax}before query string to use it, but don't know how to specify qf or other dismax related parameters in Riak Java Client. Could you advise?

Thanks,
Ajax

Hi Ajax,

The Riak Java Client, as most other Riak clients, uses the Protocol Buffer API to communicate with Riak. Yokozuna's implementation of the Protocol Buffer API allows only for a small set of query parameters [0], which have been chosen to support the standard query parser. As such, there is currently no easy way to use the extended set of query parameters through the java api.

However, you may have better luck if you talk directly to HTTP API, exposed at http://<node>:8098/search/query/<index_name>. This will accept all queries supported by Solr 4.7. Please be aware, though, that some query results that require accumulating data from all Solr nodes (such as stats queries), may not work as expected. Yokozuna constructs a new coverage query very frequently, and the actual results returned depend on which nodes are chosen in this query.

Kind Regards,

Magnus


 

_______________________________________________
riak-users mailing list
<a href="javascript:_e(%7B%7D,'cvml','riak-users@lists.basho.com');" target="_blank" class="">riak-users@...
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com




--
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431
_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: How to specify dismax related parameters like qf

Alex Moore
In reply to this post by AJAX DoneBy Jack
Hey Ajax,

Have you tried adding those parameters to the LocalParameters {!dismax} block?

e.g.: {!type=dismax qf='myfield yourfield'}solr rocks


Thanks,
Alex

On Fri, Oct 14, 2016 at 3:18 PM, AJAX DoneBy Jack <[hidden email]> wrote:
Hello Basho,

I am very new on Riak Search, I know can add {!dismax}before query string to use it, but don't know how to specify qf or other dismax related parameters in Riak Java Client. Could you advise?

Thanks,
Ajax 

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: How to specify dismax related parameters like qf

AJAX DoneBy Jack
Hi Alex,

I did tried that in Java client using PB, but getting exception, I can paste the error here tonight.

Thanks,
Ajax

On Monday, 17 October 2016, Alex Moore <[hidden email]> wrote:
Hey Ajax,

Have you tried adding those parameters to the LocalParameters {!dismax} block?

e.g.: {!type=dismax qf='myfield yourfield'}solr rocks


Thanks,
Alex

On Fri, Oct 14, 2016 at 3:18 PM, AJAX DoneBy Jack <<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;ajaxdone@gmail.com&#39;);" target="_blank">ajaxdone@...> wrote:
Hello Basho,

I am very new on Riak Search, I know can add {!dismax}before query string to use it, but don't know how to specify qf or other dismax related parameters in Riak Java Client. Could you advise?

Thanks,
Ajax 

_______________________________________________
riak-users mailing list
<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;riak-users@lists.basho.com&#39;);" target="_blank">riak-users@...
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: How to specify dismax related parameters like qf

AJAX DoneBy Jack
In reply to this post by Alex Moore
Hi Alex,

I retry again and this time it works, here is the query string:
"{!type=edismax qf=’title_s content_s’}riak solr"

Thanks,
Ajax



On Oct 17, 2016, at 10:55 AM, Alex Moore <[hidden email]> wrote:

Hey Ajax,

Have you tried adding those parameters to the LocalParameters {!dismax} block?

e.g.: {!type=dismax qf='myfield yourfield'}solr rocks


Thanks,
Alex

On Fri, Oct 14, 2016 at 3:18 PM, AJAX DoneBy Jack <[hidden email]> wrote:
Hello Basho,

I am very new on Riak Search, I know can add {!dismax}before query string to use it, but don't know how to specify qf or other dismax related parameters in Riak Java Client. Could you advise?

Thanks,
Ajax 

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com




_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com