Too many boolean clauses exception in solr

前端 未结 2 1356
余生分开走
余生分开走 2020-12-20 14:52

I am facing these problem while using OR , logical operator in framing query. I dont want to increase the maxBooleanClause value. Is there any other option than this. My OR

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-20 15:40

    You can also use a more suitable query parser like a TermQueryParser which is better at handling massive OR clauses.

    Example:

    {!terms f=uniqueId}1000,1001,10002,10003
    

    The default separator is ',' so all the terms can be which are being searched can be provided as term1,term2,term3 and so on..

    More details here: https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-TermsQueryParser

提交回复
热议问题