Reputation: 535
My requirement is simple.
I need to search with the keyword similar to SQL LIKE.
Now the search shows results for "words" rather than checking partial characters.
I found many query suggestions for SOLR. But I need to find the exact mechanism to put that on conf xml files.
Thanks in advance.
Upvotes: 0
Views: 160
Reputation: 3209
Are you building auto-complete?
If so, use Suggester
. It's part of Solr, and it does what you're talking about extremely efficiently using either a dictionary file, or a field in your index you've designated.
http://wiki.apache.org/solr/Suggester
Upvotes: 0
Reputation: 4467
The quick and dirty solution is to use wildcard in your search query using an asterisk (*). For example: test*
The more proper solution would be to use stemming to remove common word endings when you index and query the data. In the default schema, the text_en_splitting
field type would do this for you. Just define your field as text_en_splitting.
Upvotes: 1