lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang" <zhanghuang...@gmail.com>
Subject The behavior of BooleanQuery#setMaxClauseCount
Date Thu, 23 Oct 2008 23:26:44 GMT
Hi,
As we know, wildcard query may take a lot of time, especially when there're
lots of term matches. It seems there's no way to find a way to configure max
count of matched terms. BooleanQuery#setMaxClauseCount API is close to the
goal, but it throws TooManyClauseException when it exceeds the limit. What's
the purpose of this behavior? It fails to construct a query when there're
too many matched query. The only solution is to prompt user to input a more
accurate keyword? Or it's a compromise between performance and correctness.
I think the behavior of this method is more friendly if it ignores the
remaining terms when query clauses are full. Let user take the risk of
correctness if max clause is configured. User can guarantee 100% correctness
by setting it to MAX_VALUE as what setMaxClause does today. Currently, user
has no way to gain performance by setMaxClause.

What's your idea? Thanks a lot!

Mime
View raw message