Ah, right.
FilteredQuery works just great
Thanks, Yonik
Best,
.Alek
On Jun 16, 2009, at 9:45 PM, Yonik Seeley wrote:
On Tue, Jun 16, 2009 at 3:31 PM, Aleksandar
Bradic<aleksan...@vast.com> wrote:
Any ideas on how to use custom Lucene Filter (lucene.search.Filter)
in
conjuction with SolrIndexSearcher ?
You can wrap the original query with a FilteredQuery class, or create
a DocSet from the Filter via SolrIndexSearcher.convertFilter()
-Yonik
http://www.lucidimagination.com
The case is writing custom Filter performing arbitrary records
selection and
AND-ing it to the existing filters passed in the query.
However, the ResponseBuilder filters are Query objects, and there
is no
visible means of mixing those with Filter's in the standard
QueryCommand
object.
(There is a search(Query query, Filter filter, Sort sort) method
that allow
passing of Filter but no way of mixing it with existing query.
Also, using
this means immediate loss of all caching benefits etc.).
Any other idea on how to pass a custom filter applying arbitrary
user-defined logic (for example "random drop of 30% records from
result
set"), to standard query would be useful as well.
Thanks,
.Alek