Re: Ranking search results by relevancy
Alex, Here's what you asked in your original email, and why I mentioned OR: "Can it be done all at once in just 1 search query? or should I compile results from 3 queries?" These documents indicate that the default sort is descending relevancy score: * https://wiki.apache.org/solr/SolrRelevancyFAQ#Why_are_search_results_returned_in_the_order_they_are.3F * https://wiki.apache.org/solr/CommonQueryParameters#sort The relevancy FAQ link I provided has useful information and links to other documents that should be able to give you more information about what kinds of sorting you can do. -- Luke Bakken Engineer lbak...@basho.com On Wed, May 25, 2016 at 9:33 AM, Alex De la rosa wrote: > Hi Luke, > > That was not the question... I know that I can use ORs, etc... I wanted to > know how to sort them by relevancy or higher equality score. > > Thanks, > Alex > > On Wed, May 25, 2016 at 8:08 PM, Luke Bakken wrote: >> >> Hi Alex, >> >> You can use the HTTP search endpoint to see what information Riak >> returns for Solr queries as well as to try out queries: >> https://docs.basho.com/riak/kv/2.1.4/developing/usage/search/#querying >> >> Since you're indexing first and last name, I'm not sure what indexing >> a full name buys you on top of that. >> >> It should be possible to combine your queries using OR. >> >> More info about Solr ranking can be found online (such as >> https://wiki.apache.org/solr/SolrRelevancyFAQ). >> >> -- >> Luke Bakken >> Engineer >> lbak...@basho.com >> >> >> On Wed, May 18, 2016 at 10:07 AM, Alex De la rosa >> wrote: >> > Hi all, >> > >> > I would like to perform a search on Riak/Solr of people given an input >> > containing its full name (or part of it), like when searching for >> > members in >> > Facebook's search bar. >> > >> > search input [ alex garcia ] >> > >> > results = client.fulltext_search('people', 'firstname_register:*alex* OR >> > lastname_register:*garcia*') >> > >> > this would give me members like: >> > >> > alex garcia >> > alexis garcia >> > alex fernandez >> > jose garcia >> > >> > Is there any way to get these results ranked/ordered by the most precise >> > search? "alex garcia" would be the most relevant because matches equally >> > to >> > the search input... "alexis garcia" may come second as even not an exact >> > match is very similar pattern, the other two would come after as they >> > match >> > only 1 of the 2 search parameters. >> > >> > Would it be convenient to index also fullname_register:alex garcia in >> > order >> > to find exact matches too? >> > >> > Can it be done all at once in just 1 search query? or should I compile >> > results from 3 queries? >> > >> > result_1 = client.fulltext_search('people', 'fullname_register:alex >> > garcia') >> > result_2 = client.fulltext_search('people', 'firstname_register:*alex* >> > AND >> > lastname_register:*garcia*') >> > result_3 = client.fulltext_search('people', 'firstname_register:*alex* >> > OR >> > lastname_register:*garcia*') >> > >> > Thanks and Best Regards, >> > Alex >> > >> > ___ >> > riak-users mailing list >> > riak-users@lists.basho.com >> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >> > > > ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: Ranking search results by relevancy
Hi Luke, That was not the question... I know that I can use ORs, etc... I wanted to know how to sort them by relevancy or higher equality score. Thanks, Alex On Wed, May 25, 2016 at 8:08 PM, Luke Bakken wrote: > Hi Alex, > > You can use the HTTP search endpoint to see what information Riak > returns for Solr queries as well as to try out queries: > https://docs.basho.com/riak/kv/2.1.4/developing/usage/search/#querying > > Since you're indexing first and last name, I'm not sure what indexing > a full name buys you on top of that. > > It should be possible to combine your queries using OR. > > More info about Solr ranking can be found online (such as > https://wiki.apache.org/solr/SolrRelevancyFAQ). > > -- > Luke Bakken > Engineer > lbak...@basho.com > > > On Wed, May 18, 2016 at 10:07 AM, Alex De la rosa > wrote: > > Hi all, > > > > I would like to perform a search on Riak/Solr of people given an input > > containing its full name (or part of it), like when searching for > members in > > Facebook's search bar. > > > > search input [ alex garcia ] > > > > results = client.fulltext_search('people', 'firstname_register:*alex* OR > > lastname_register:*garcia*') > > > > this would give me members like: > > > > alex garcia > > alexis garcia > > alex fernandez > > jose garcia > > > > Is there any way to get these results ranked/ordered by the most precise > > search? "alex garcia" would be the most relevant because matches equally > to > > the search input... "alexis garcia" may come second as even not an exact > > match is very similar pattern, the other two would come after as they > match > > only 1 of the 2 search parameters. > > > > Would it be convenient to index also fullname_register:alex garcia in > order > > to find exact matches too? > > > > Can it be done all at once in just 1 search query? or should I compile > > results from 3 queries? > > > > result_1 = client.fulltext_search('people', 'fullname_register:alex > garcia') > > result_2 = client.fulltext_search('people', 'firstname_register:*alex* > AND > > lastname_register:*garcia*') > > result_3 = client.fulltext_search('people', 'firstname_register:*alex* OR > > lastname_register:*garcia*') > > > > Thanks and Best Regards, > > Alex > > > > ___ > > riak-users mailing list > > riak-users@lists.basho.com > > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > > > ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: Ranking search results by relevancy
Hi Alex, You can use the HTTP search endpoint to see what information Riak returns for Solr queries as well as to try out queries: https://docs.basho.com/riak/kv/2.1.4/developing/usage/search/#querying Since you're indexing first and last name, I'm not sure what indexing a full name buys you on top of that. It should be possible to combine your queries using OR. More info about Solr ranking can be found online (such as https://wiki.apache.org/solr/SolrRelevancyFAQ). -- Luke Bakken Engineer lbak...@basho.com On Wed, May 18, 2016 at 10:07 AM, Alex De la rosa wrote: > Hi all, > > I would like to perform a search on Riak/Solr of people given an input > containing its full name (or part of it), like when searching for members in > Facebook's search bar. > > search input [ alex garcia ] > > results = client.fulltext_search('people', 'firstname_register:*alex* OR > lastname_register:*garcia*') > > this would give me members like: > > alex garcia > alexis garcia > alex fernandez > jose garcia > > Is there any way to get these results ranked/ordered by the most precise > search? "alex garcia" would be the most relevant because matches equally to > the search input... "alexis garcia" may come second as even not an exact > match is very similar pattern, the other two would come after as they match > only 1 of the 2 search parameters. > > Would it be convenient to index also fullname_register:alex garcia in order > to find exact matches too? > > Can it be done all at once in just 1 search query? or should I compile > results from 3 queries? > > result_1 = client.fulltext_search('people', 'fullname_register:alex garcia') > result_2 = client.fulltext_search('people', 'firstname_register:*alex* AND > lastname_register:*garcia*') > result_3 = client.fulltext_search('people', 'firstname_register:*alex* OR > lastname_register:*garcia*') > > Thanks and Best Regards, > Alex > > ___ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
riak cs performance question
Hi I am quite new to RIAK-*. I have setup riak cs on a single server (for evaluation purposes) with adequate RAM, CPU and high performance storage. I am using Cosbench to benchmark RIAK-CS using the S3 proxy connection. Cosbench is also running on the same server (the reasons being I wanted to eliminate the effect of network on performance). I have tried different workloads (100% reads, 80:20 read write mix, number of objects (20-2), size of objects (4K-64K)). My observation has been that I have not managed to push the throughput to beyond 2.5Kops - the best case being 100% reads and about 128 objects and 128 cosbench worker threads. With 20% writes the number comes down to less than 1000. The CPU is largely idle, plenty of RAM left (order of GB). Storage is capable of 300K+ IOPS but hardly utilised. Coming to my question: does this represent the limit of performance of a *single* riak-cs node. I notice that the average response time is in the order of 60ms. Lastly, has anyone compared S3 with RIAK-CS? Thanks, -M -- View this message in context: http://riak-users.197444.n3.nabble.com/riak-cs-performance-question-tp4034341.html Sent from the Riak Users mailing list archive at Nabble.com. ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: riak-erlang-client
Thank you for the quick answer. On Wed, May 25, 2016 at 4:13 PM, Nick Marino wrote: > Hi Richard, > > Yes, sharing a riak-erlang-client connection process among multiple Erlang > processes should not cause any problems. The riak_pb_socket processes are > implemented using a gen_server, and they use a queuing mechanism to handle > concurrent requests. If process A has sent a request and is waiting for a > response, and process B tries to send a request using the same connection > process, its request will get queued up and will be sent once process A's > request gets a reply. > > Keep in mind though that this queuing mechanism could cause suboptimal > performance if you have many processes competing for use of a single > connection: users of the connection may end up spending a lot of time > blocked, waiting for requests from other processes to finish. Depending on > the circumstances, you may find that it's better to open multiple > connections than to share a single connection among multiple processes. > > Nick > > On Wed, May 25, 2016 at 6:28 AM, Richard Jonas < > richard.jo...@erlang-solutions.com> wrote: > >> Guys, >> >> most of the examples I can see that riak erlang client processes cannot >> be shared with multiple processes. Is it safe if more processes use the >> same riak connection? So in other words: is riak erlang client thread-safe? >> >> Thanks >> >> -- >> Richard Jonas >> Erlang Solutions Hungary Kft >> >> Address: >> Riverpark Office K.32 >> Közraktár street 32. 3/1. >> 1093 Budapest >> Hungary >> Phone/fax: >> +36-1-7000-654 >> >> ___ >> riak-users mailing list >> riak-users@lists.basho.com >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >> >> > -- Richard Jonas Erlang Solutions Hungary Kft Address: Riverpark Office K.32 Közraktár street 32. 3/1. 1093 Budapest Hungary Phone/fax: +36-1-7000-654 ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: riak-erlang-client
Hi Richard, Yes, sharing a riak-erlang-client connection process among multiple Erlang processes should not cause any problems. The riak_pb_socket processes are implemented using a gen_server, and they use a queuing mechanism to handle concurrent requests. If process A has sent a request and is waiting for a response, and process B tries to send a request using the same connection process, its request will get queued up and will be sent once process A's request gets a reply. Keep in mind though that this queuing mechanism could cause suboptimal performance if you have many processes competing for use of a single connection: users of the connection may end up spending a lot of time blocked, waiting for requests from other processes to finish. Depending on the circumstances, you may find that it's better to open multiple connections than to share a single connection among multiple processes. Nick On Wed, May 25, 2016 at 6:28 AM, Richard Jonas < richard.jo...@erlang-solutions.com> wrote: > Guys, > > most of the examples I can see that riak erlang client processes cannot be > shared with multiple processes. Is it safe if more processes use the same > riak connection? So in other words: is riak erlang client thread-safe? > > Thanks > > -- > Richard Jonas > Erlang Solutions Hungary Kft > > Address: > Riverpark Office K.32 > Közraktár street 32. 3/1. > 1093 Budapest > Hungary > Phone/fax: > +36-1-7000-654 > > ___ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > > ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
riak-erlang-client
Guys, most of the examples I can see that riak erlang client processes cannot be shared with multiple processes. Is it safe if more processes use the same riak connection? So in other words: is riak erlang client thread-safe? Thanks -- Richard Jonas Erlang Solutions Hungary Kft Address: Riverpark Office K.32 Közraktár street 32. 3/1. 1093 Budapest Hungary Phone/fax: +36-1-7000-654 ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: Ranking search results by relevancy
Hi, nobody has an answer to this? Thanks, Alex On Wed, May 18, 2016 at 9:07 PM, Alex De la rosa wrote: > Hi all, > > I would like to perform a search on Riak/Solr of people given an input > containing its full name (or part of it), like when searching for members > in Facebook's search bar. > > search input [ alex garcia ] > > results = client.fulltext_search('people', 'firstname_register:*alex* OR > lastname_register:*garcia*') > > this would give me members like: > > alex garcia > alexis garcia > alex fernandez > jose garcia > > Is there any way to get these results ranked/ordered by the most precise > search? "alex garcia" would be the most relevant because matches equally to > the search input... "alexis garcia" may come second as even not an exact > match is very similar pattern, the other two would come after as they match > only 1 of the 2 search parameters. > > Would it be convenient to index also *fullname_register:alex garcia* in > order to find exact matches too? > > Can it be done all at once in just 1 search query? or should I compile > results from 3 queries? > > result_1 = client.fulltext_search('people', 'fullname_register:alex > garcia') > result_2 = client.fulltext_search('people', 'firstname_register:*alex* AND > lastname_register:*garcia*') > result_3 = client.fulltext_search('people', 'firstname_register:*alex* OR > lastname_register:*garcia*') > > Thanks and Best Regards, > Alex > ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com