That is off of the TermSpans class. BTQ (BoostingTermQuery) is
implemented to extend SpanQuery, thus SpanNearQuery isn't, w/o
modification, going to have access to these things. However, if you
look at the SpanTermQuery, you will see that it's implementation of
Spans is indeed the TermSpans class. So, I think you could cast to
it or handle it through instanceof.
I am not completely sure here, but it seems like we may need an
efficient way to access the TermPositions for each document. That
is, the Spans class doesn't provide this and maybe it should
somehow. Again, I am just thinking out loud here.
Thus, if we modified Spans to have the following methods:
byte[] getPayload(byte[] data, int offset)
boolean isPayloadAvailable()
I think this would be useful. Perhaps this should be discussed on dev.
Cheers,
Grant
On Jul 12, 2007, at 8:20 AM, Peter Keegan wrote:
I'm looking for Spans.getPositions(), as shown in
BoostingTermQuery, but
neither NearSpansOrdered nor NearSpansUnordered (which are the Spans
provided by SpanNearQuery) provide this method and it's not clear
to me how
to add it.
Peter
On 7/11/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:
: 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
Isn't Spans.start() and Spans.end() what you are looking for?
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]