Solr wildcard query with whitespace

前端 未结 9 1641
悲哀的现实
悲哀的现实 2020-12-06 04:57

I have a wildcard query that looks something like:

q=location:los a*

I\'d like it to match \"los angeles\" and \"los altos\". A query like

9条回答
  •  情书的邮戳
    2020-12-06 05:10

    Solution for your problem using complex query parser:

    q={!complexphrase inOrder=true}location:"los a*"
    

    To know more about Complex phrase query parser, checkout this link! https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-ComplexPhraseQueryParser

提交回复
热议问题