lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nalini Kartha <nalinikar...@gmail.com>
Subject Re: Converting fq params to Filter object
Date Wed, 26 Dec 2012 23:10:37 GMT
Hi Otis,

Sorry, let me be more specific.

The end goal is for the DirectSpellChecker to make sure that the
corrections it is returning will return some results taking into account
the fq params included in the original query. This is a follow up question
to another question I had posted earlier -

http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201212.mbox/%3CCAMqOzYFTgiWyRbvwSdF0hFZ1SZNkQ9gnBJfDb_OBNeLsMvR0XA@mail.gmail.com%3E

Initially, the way I was thinking of implementing this was to call one of
the SolrIndexSearcher.getDocSet() methods for ever correction, passing in
the correction as the Query and a DocSet created from the fq queries. But I
didn't think that calling a SolrIndexSearcher method in Lucene code
(DirectSpellChecker) was a good idea. So I started looking at which method
on IndexSearcher would accomplish this. That's where I'm stuck trying to
figure out how to convert the fq params into a Filter object.

Does this approach make sense? Also I realize that this implementation is
probably non-performant but wanted to give it a try and measure how it
does. Any advice about what the perf overhead from issuing such queries for
say 50 corrections would be? Note that the filter from the fq params is the
same for every query - would that be cached and help speed things up?

Thanks,
Nalini


On Wed, Dec 26, 2012 at 3:34 PM, Otis Gospodnetic <
otis.gospodnetic@gmail.com> wrote:

> Hi,
>
> The fq *is* for filtering.
>
> What is your end goal, what are you trying to achieve?
>
> Otis
> Solr & ElasticSearch Support
> http://sematext.com/
> On Dec 26, 2012 11:22 AM, "Nalini Kartha" <nalinikartha@gmail.com> wrote:
>
> > Hi,
> >
> > I'm trying to figure out how to convert the fq params that are being
> passed
> > to Solr into something that can be used to filter the results of a query
> > that's being issued against the Lucene IndexSearcher (I'm modifying some
> > Lucene code to issue the query so calling through to one of the
> > SolrIndexSearcher methods would be ugly).
> >
> > Looks like one of the IndexSearcher.search(Query query, Filter filter,
> ...)
> >  methods would do what I want but I'm wondering if there's any easy way
> of
> > converting the fq params into a Filter? Or is there a better way of doing
> > all of this?
> >
> > Thanks,
> > Nalini
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message