lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Huntsman84 <tpgarci...@gmail.com>
Subject Re: Too many results with RegexQuery
Date Tue, 19 May 2009 08:26:36 GMT

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 alphabetical order).

How could I build the filter?


Ian Lea wrote:
> 
> 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* what you
> are getting.
> 
> 
> --
> Ian.
> 
> 
> 
> On Tue, May 19, 2009 at 7:47 AM, Huntsman84 <tpgarcia84@gmail.com> wrote:
>>
>> I mean "too many terms", excuse me.
>>
>>
>> JoelGrrrr 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-----
>>> From: Huntsman84 <tpgarcia84@gmail.com>
>>> Reply-To: java-user@lucene.apache.org
>>> To: java-user@lucene.apache.org
>>> Subject: Too many results with RegexQuery
>>> Date: Mon, 18 May 2009 09:07:27 -0700 (PDT)
>>>
>>> Hi,
>>>
>>> I am using RegexQuery aiming to get a list of records from a regular
>>> expression, but in some cases the search returns too many results, and
>>> for
>>> that my program throws an Exception.
>>>
>>> How could I customize the query or the searcher to, for example, get
>>> just
>>> a
>>> set of results?
>>>
>>> Thank you so much!!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Too-many-results-with-RegexQuery-tp23600064p23611881.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message