: Hi all, I am trying to use a custom search filter : (org.apache.lucene.search.Filter) but I am unsure of where I should configure : this. : : Would I have to create my own SearchHandler that would wrap this logic in? Any : example/suggestions out there?
the easiest way to plugin a custom Filter is to wrap it in a ConstantScoreQuery and use it as part of the "filters" that SolrIndexSearcher applies (that way it will be cached independently and can be reused) you could do this in a SearchComponent where you decide when to generate the Filter based on query params and then add it explicitly (see ResponseBuilder.getFilters()). or you could do it in a QParserPlugin, in which case clients could optionally enable it by refering ot your QParser by name in the local params of an "fq" param. -Hoss