3

Does Lucene (or Solr) still have the 1024 max terms query limit? I could not find this info in the 3.6 lucene version and I'd need to fire a query with a high number of terms.

Thank you, - Dan

Daniele
  • 359
  • 7
  • 15

1 Answers1

4

There is BooleanQuery.setMaxClauseCount which you might want to invoke and raise this limit.

mindas
  • 26,463
  • 15
  • 97
  • 154
  • Thank you! Is there any other upper limit? I notices it works when I double the count but it does not work with 4k limit for example. – Daniele Jul 25 '12 at 12:25
  • I think this limit is set for security reasons where by passing gigantic query can easily DOS your server. By upping the limit you understand the consequences and accept the performance implications. As for 4K limit - you might want to open another question and provide more details on what *exactly* is not working. – mindas Jul 25 '12 at 13:14
  • OK, thank you, I will. Actually I'm using Solr, and just get empty page, need to spot a debug tool to understand exactly what it does not work. The reason I have a so large query is because of big query expansions, if there is no solution I'm thinking to split into 2 queries and manually merge results if it makes sense. – Daniele Jul 26 '12 at 08:02