Pregunta

org.apache.lucene.queryParser.QueryParser.parse(String arg0) throws ParseException when the String arg0 is too long, is there any idea on how to avoid this problem?

¿Fue útil?

Solución

Is the issue is length, then the underlying issue is a TooManyClauses exception, I'm guessing.

You can deal with this directly by increasing the max clauses, by calling BooleanQuery.setMaxClauseCount().

There a good chance that's just treating the symptom, though. This typically indicates, that you can expect poor performance, due to having such broad queries. You might consider trying to make use of Filters for some part of the query, which may solve the issue and improve performance, or otherwise improving how you query the index.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top