0
votes

I have question is it possible to perform a phrase search with wild cards in solr/lucene as if i have two queries both have exactly same results. One is:

+Contents:"change market"

and the other is:

+Contents:"change* market"

I assumed the second should match "changes market", but it does not return any matches.

2

2 Answers

3
votes

You can do this in Lucene with ComplexPhraseQueryParser. Solr has facility to plug in custom query parser with QParserPlugin. You can possibly use these two to have desired functionality with Solr as well.

0
votes

IMO it is not possible to search for wild cards with in phrase. You might want to consider using two queries with proximity search.(q=change* market&qs=1) http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_search_for_one_term_near_another_term_.28say.2C_.22batman.22_and_.22movie.22.29