lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John <fatmanc...@gmail.com>
Subject Re: Function Query vs. Analyzing results
Date Thu, 17 Jan 2013 16:53:00 GMT
Hi Mikhail,

Thanks for the info.

If my FunctionQuery accesses stored fields like that:

public float floatVal(int docNum) {

  Document doc = null;
  try { doc = reader.document(docNum); } catch (Exception e) {}
  return getSimilarityScore(doc);
}

Is it still the same case? Is there a faster way to access document info?


Cheers,

John




On Thu, Jan 17, 2013 at 6:40 PM, Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:

> Hello John,
>
> > getting all the documents and analyzing their result fields?
>
> is almost not ever possible. Lucene stored fields usually are really slow.
>
> when FunctionQueries is backed of field values it uses Lucene FieldCache,
> which is array of field values that's damn faster.
>
> You are welcome.
>
>
> On Thu, Jan 17, 2013 at 8:20 PM, John <fatmancorp@gmail.com> wrote:
>
> > Hi,
> >
> > Is there any performance boost when using FunctionQuery over getting all
> > the documents and analyzing their result fields?
> >
> > As far as I understand, Function Query does exactly that, for each
> matched
> > document it feches the fields you're interested at, and then it
> calculates
> > whatever score mechanism you need.
> >
> > Are there some special configurations that I can use that take make
> > FunctionQueries faster?
> >
> > Cheers,
> > John
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
>  <mkhludnev@griddynamics.com>
>

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