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

Reply via email to