lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Keegan" <peterlkee...@gmail.com>
Subject Re: Payloads and PhraseQuery
Date Thu, 12 Jul 2007 00:19:04 GMT
I'm now looking at using payloads with SpanNearQuery but I don't see any
clear way of getting the payload(s) from the matching span terms. The term
positions for the payloads seem to be buried beneath SpanCells in the
NearSpansOrdered and NearSpansUnordered classes, which are not public. I'd
be content to be able to get the payload from just the first term of the
span.

Can anyone suggest an approach for making payloads work with SpanNearQuery?

Peter


On 6/27/07, Grant Ingersoll <gsingers@apache.org> wrote:
>
> Could you get what you need combining the BoostingTermQuery with a
> SpanNearQuery to produce a score?  Just guessing here..
>
> At some point, I would like to see more Query classes around the
> payload stuff, so please submit patches/feedback if and when you get
> a solution
>
> On Jun 27, 2007, at 10:45 AM, Peter Keegan wrote:
>
> > I'm looking at the new Payload api and would like to use it in the
> > following
> > manner. Meta-data is indexed as a special phrase (all terms at same
> > position) and a payload is stored with the first term of each
> > phrase. I
> > would like to create a custom query class that extends PhraseQuery
> > and uses
> > its PhraseScorer to find matching documents. The custom query class
> > then
> > reads the payload from the first term of the matching query and
> > uses it to
> > produce a new score. However, I don't see how to get the payload
> > from the
> > PhraseScorer's TermPositions. Is this possible?
> >
> >
> > Peter
>
> --------------------------
> Grant Ingersoll
> Center for Natural Language Processing
> http://www.cnlp.org/tech/lucene.asp
>
> Read the Lucene Java FAQ at http://wiki.apache.org/lucene-java/LuceneFAQ
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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