问题
The following is proximity search in SOLR:
"john josh"~12
But what is I wanted to search for josh token being close not to john, but to the expression "john smith"?
Is there a way to make something like this work:
"("john smith") josh"~12
回答1:
Check these two parsers:
- ComplexPhraseQueryParser
- XMLQueryParser
I think the first one should do what you need, and maybe both can.
来源:https://stackoverflow.com/questions/49010974/searching-for-a-phrase-in-proximity-to-another-token-in-solr