lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Leangen <>
Subject How can I limit the number of hits in my query?
Date Mon, 14 May 2007 07:24:02 GMT


I am new to Lucene, so forgive me if my question is basic. I did try
googling for an answer...

For an ajax autocomplete widget, I am querying using Lucene. I only want
to return, for example, the first 20 hits of anything that Lucene finds
in whatever order Lucene gives to me.

Two questions:

 - How can I limit the number of hits? I don't know in
   advance what the data will be, so it's not feasible for
   me to use RangeQuery.

 - Will this solve the problem I am getting with maxClauseCount?$TooManyClauses
   maxClauseCount is set to 1024

Thank you!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message