lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: AW: Avoiding caching of special filter queries
Date Fri, 20 Apr 2007 18:57:58 GMT

On Apr 20, 2007, at 10:02 AM, Burkamp, Christian wrote:
> No, what I need to do is
>
>     &q="my funny query"&fq=user:erik&fq=id:"doc Id"&hl=on ...

No you don't.... what you need is:

	&q="my funny query" AND id:"doc Id"&fq=user:erik&hl=on

> This is because the StandardRequestHandler needs the original query  
> to do proper highlighting.
> The user gets his paginated result page with his next 10 hits. He  
> can then select one document for highlighting. Then I just repeat  
> the last request with an additional filter query to select this one  
> document and add the highlighting parameters.

I think the above will suit this use case just fine.  No?

	Erik


>
> -- Christian
>
> -----Urspr√ľngliche Nachricht-----
> Von: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Gesendet: Freitag, 20. April 2007 15:43
> An: solr-user@lucene.apache.org
> Betreff: Re: Avoiding caching of special filter queries
>
>
>
> On Apr 20, 2007, at 7:11 AM, Burkamp, Christian wrote:
>> I'm using filter queries to implement document level security with
>> solr.
>> The caching mechanism for filters separate from queries comes in  
>> handy
>> and the system performs well once all the filters for the users of  
>> the
>> system are stored in the cache.
>> However, I'm storing full document content in the index for the
>> purpose
>> of highlighting. In addition to the standard snippet highlighting I
>> would like to offer a feature that displays the highlighted full
>> document content. I can add a filter query to select just the needed
>> Document by ID but this filter would go into the filter cache as  
>> well,
>> possibly throwing out some of the other usefull filters.
>> Is there a way to get the single document with highlighting info but
>> without polluting the filter cache?
>
> Correct me if I'm wrong, but here's my understanding...
>
>     &q=id:"doc id"&fq=user:erik
>
> is what you'd want to do.  q=id:"doc" won't go into the filter cache,
> but rather the query cache and the document itself into the document
> cache.  So you won't risk bumping things out of the filter cache by
> using queries.
>
> 	Erik


Mime
View raw message