lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Ritchie" <br...@jivesoftware.com>
Subject RE: How can I limit the number of hits in my query?
Date Tue, 15 May 2007 15:03:34 GMT
> Ok, you're right. It's not the limiting of the results that's 
> the problem, it's the way the search is expanded.
> 
> Since this is an autocomplete, when the user types, for 
> example "a" or a Japanese character "あ", I am using 
> PrefixFilter for this, so I guess the search turns into "a*" 
> and "あ*" respectively.
> 
> In the archive, the related posts I read either refer to a 
> DateRange (where it is possible to search first by year, then 
> month... etc.), or they suggest to increase the max count.
> 
> Neither of these solutions work in my case... It's not a 
> date, and I have no idea of the results in advance and it 
> would not be practical or elegant to speculate on the results 
> (for example first try aa*‾ab* and see what that gives, etc.).
> 
> I can get access to the "weight" values of the terms (a data 
> field determined by their frequency of use), so I'll try 
> something related to that. For people with more experience, 
> would that be a good path to take?
> 
> Otherwise, would a reasonable solution be to override or 
> re-implement PrefixFilter?

One possible solution that may or may not work for you is explained here: http://mail-archives.apache.org/mod_mbox/lucene-java-user/200503.mbox/%3c42357B7E.3000709@i-hypergrid.com%3e.
For general purpose searching I'm not sure it's a great choice however I wanted to make you
aware of it.


Regards,

Bruce Ritchie


---------------------------------------------------------------------
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