Re: Too many results with RegexQuery

2009-05-19 Thread Ian Lea
To get the first n clauses you could maybe create your own query subclassing RegexQuery with an implementation of getEnum(reader) that returned a FilteredTermEnum that was a subclass of RegexTermEnum that stopped after the first n. That's made up from following the javadoc and I've no idea if it i

Re: Too many results with RegexQuery

2009-05-19 Thread Huntsman84
I tryed that solution at my first attempt, but the result is that my application turns too slow. What I need is to create a query with a small amount of clauses, 100-200, using some kind of filter. For example, if my RegexQuery generates 5000 clauses, I just want from the 100 first clauses (in al

Re: Too many results with RegexQuery

2009-05-19 Thread Ian Lea
If you mean you are getting BooleanQuery.TooManyClauses then the simple solution is BooleanQuery.setMaxClauseCount(int maxClauseCount). See the javadocs for default values and some suggestions on workarounds. And the FAQ. And Google. If this isn't what you are getting, please tell us *exactly*

Re: Too many results with RegexQuery

2009-05-18 Thread Huntsman84
I mean "too many terms", excuse me. JoelG wrote: > > "but in some cases the search returns too many results" > do you *really* mean you get "too many results"? or do you actually mean > you get a "too many terms" exception due to the query expansion? > > > > -Original Message- >

Re: Too many results with RegexQuery

2009-05-18 Thread Joel Halbert
"but in some cases the search returns too many results" do you *really* mean you get "too many results"? or do you actually mean you get a "too many terms" exception due to the query expansion? -Original Message- From: Huntsman84 Reply-To: java-user@lucene.apache.org To: java-user@lucen