figuring out reason for maxClauseCount is set to 1024 error

后端 未结 5 1629
萌比男神i
萌比男神i 2021-02-18 15:35

I\'ve two sets of search indexes. TestIndex (used in our test environment) and ProdIndex(used in PRODUCTION environment). Lucene search query: +date:[20090410184806 TO 200910071

5条回答
  •  醉梦人生
    2021-02-18 15:59

    The range query essentially gets transformed to a boolean query with one clause for every possible value, ORed together.

    For example, the query +price:[10 to 13] is tranformed to a boolean query

    +(price:10 price:11 price:12 price:13)
    

    assuming all the values 10-13 exist in the index.

    I suppose, all of your 1300 values fall in the range you have given. So, boolean query has 1300 clauses, which is higher than the default value of 1024. In the test index, the limit of 1024 is not reached as there are only 950 values.

提交回复
热议问题