Hi -

I have done some searching and haven't found what I was looking for. I hope
this has not been discussed in the forum already.

This is a question as well as looking for design ideas.

I need the ability to dynamically filter out search results as they are
being collected. The logic that I am developing cannot be statically applied
at indexing time, so the data is NOT available in the indexed form. It can
be derived/calculated using one or more of the indexed fields, and it's
different for each query. The purpose of this "derived field" is to
eliminate resulting indexes so only a subset is considered. This is very
similar to the Filter concept already in the SolrIndexSearcher.QueryCommand.
The difference is that I can't write a Lucene Query to obtain the subset of
indices, I need to implement an algorithm involving using some of the fields
in the documents.

What I had in mind is the concept of a DyamicFilter. A DynamicFilter can be
used in the HitCollectors (in SolrIndexSearcher) to perform dynamic
filtering as results are being collected. DynamicFilters would be added into
the SolrSearchIndexer.QueryCommand class so they can be called during
collecting time. I considered writing a SearchComponent or a RequestHandler,
and they seem to be a little bit off for the timing that I needed.

The parameters to construct my DynamicFilters are passed in from http query
params. I could pick them up and create the DynamicFilters in the
QueryComponent as it creates a QueryCommand. The QueryCommand will then use
it during Hit Collection in SolrIndexSearcher.

I hope this captures the detail of what I am trying to do. I am looking for
validation/alternative suggestions from an insider (yonik?). I feel bad
having to do the intrusive modification here, and am open for suggestions. I
would be interested in contributing this work if it turns out to be
valuable.

Thanks for reading.

Xibin
-- 
View this message in context: 
http://www.nabble.com/dynamic-filtering-tp20079841p20079841.html
Sent from the Solr - Dev mailing list archive at Nabble.com.

Reply via email to