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.
Ex:-
- Search query: “test”
- Expected results: “test%” – Which gives “test”, “tested”,
“testing”, etc… - Actual result: “test”
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.
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_splittingfield type would do this for you. Just define your field as text_en_splitting.