You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Riccardo Daviddi <rd...@gmail.com> on 2005/07/25 13:05:35 UTC

filtering on searching or after through hits?

Hi all,
I have to filter my searching in two ways:
1) by score, I want that only docs with score higher than a threshold
are returned.
2) by num of docs, I want that only, for example, the first 20 docs
are returned.

It's better do it with a queryfilter or search for all and after look
through the hits with some conditions?
-- 
Riccardo Daviddi

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


Re: filtering on searching or after through hits?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 26, 2005, at 3:15 AM, Paul Libbrecht wrote:

> But filters are in-memory biests so have to be recomputed every- 
> time... what would be the best approach:
> - store the filter (that shouldn't be very expensive but I never  
> tried)
> - modify the index to add a flag ?
> Say, for now, my filter contains 70% of the documents.

Could you frame your questions around a use case?

A filter is really designed for long-term use, not for instantiation  
for every search.

     Erik


>
> thanks
>
> paul
>
>
> Le 25 juil. 05, à 18:40, Riccardo Daviddi a écrit :
>
>
>> ok:)
>> so I do this "filtering" on the hits.
>> thx
>>
>> On 7/25/05, Erik Hatcher <er...@ehatchersolutions.com> wrote:
>>
>>>
>>> On Jul 25, 2005, at 7:05 AM, Riccardo Daviddi wrote:
>>>
>>>> Hi all,
>>>> I have to filter my searching in two ways:
>>>> 1) by score, I want that only docs with score higher than a  
>>>> threshold
>>>> are returned.
>>>> 2) by num of docs, I want that only, for example, the first 20 docs
>>>> are returned.
>>>>
>>>> It's better do it with a queryfilter or search for all and after  
>>>> look
>>>> through the hits with some conditions?
>>>>
>>>
>>> A QueryFilter can do neither of these criteria.  I recommend simply
>>> doing a search and limiting the Hits shown based on the desired
>>> criteria.
>>>
>>>      Erik
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>>
>>
>>
>> -- 
>> Riccardo Daviddi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Re: filtering on searching or after through hits?

Posted by Paul Libbrecht <pa...@activemath.org>.
But filters are in-memory biests so have to be recomputed every-time... 
what would be the best approach:
- store the filter (that shouldn't be very expensive but I never tried)
- modify the index to add a flag ?
Say, for now, my filter contains 70% of the documents.

thanks

paul


Le 25 juil. 05, à 18:40, Riccardo Daviddi a écrit :

> ok:)
> so I do this "filtering" on the hits.
> thx
>
> On 7/25/05, Erik Hatcher <er...@ehatchersolutions.com> wrote:
>>
>> On Jul 25, 2005, at 7:05 AM, Riccardo Daviddi wrote:
>>> Hi all,
>>> I have to filter my searching in two ways:
>>> 1) by score, I want that only docs with score higher than a threshold
>>> are returned.
>>> 2) by num of docs, I want that only, for example, the first 20 docs
>>> are returned.
>>>
>>> It's better do it with a queryfilter or search for all and after look
>>> through the hits with some conditions?
>>
>> A QueryFilter can do neither of these criteria.  I recommend simply
>> doing a search and limiting the Hits shown based on the desired
>> criteria.
>>
>>      Erik
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
>
> -- 
> Riccardo Daviddi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Re: filtering on searching or after through hits?

Posted by Riccardo Daviddi <rd...@gmail.com>.
ok:)
so I do this "filtering" on the hits.
thx

On 7/25/05, Erik Hatcher <er...@ehatchersolutions.com> wrote:
> 
> On Jul 25, 2005, at 7:05 AM, Riccardo Daviddi wrote:
> > Hi all,
> > I have to filter my searching in two ways:
> > 1) by score, I want that only docs with score higher than a threshold
> > are returned.
> > 2) by num of docs, I want that only, for example, the first 20 docs
> > are returned.
> >
> > It's better do it with a queryfilter or search for all and after look
> > through the hits with some conditions?
> 
> A QueryFilter can do neither of these criteria.  I recommend simply
> doing a search and limiting the Hits shown based on the desired
> criteria.
> 
>      Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 


-- 
Riccardo Daviddi

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


Re: filtering on searching or after through hits?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 25, 2005, at 7:05 AM, Riccardo Daviddi wrote:
> Hi all,
> I have to filter my searching in two ways:
> 1) by score, I want that only docs with score higher than a threshold
> are returned.
> 2) by num of docs, I want that only, for example, the first 20 docs
> are returned.
>
> It's better do it with a queryfilter or search for all and after look
> through the hits with some conditions?

A QueryFilter can do neither of these criteria.  I recommend simply  
doing a search and limiting the Hits shown based on the desired  
criteria.

     Erik


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