Which query parser should I use to get results similar to db2 with solr

178 Views Asked by At

I am trying to get results similar to db2 with solr query.

Since we want results similar to db2, we are appending a wild card at the end of the query phrase.

For example, if query is passed as 'the schoo*', then I want following results :

the school
the schools
the timpany shcool

I tried using edismax, but since we are using wild card at the end, its not giving apt results.

1

There are 1 best solutions below

0
Oyeme On

You can use complex phrases parser

For example

{!complexphrase df= FieldName}"the schoo*"

https://lucene.apache.org/solr/guide/6_6/other-parsers.html

https://lucene.apache.org/core/6_6_0//queryparser/org/apache/lucene/queryparser/complexPhrase/ComplexPhraseQueryParser.html

QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*".