Have a look at the SpanQuery, specifically the SpanNearQuery. The
getSpans() method will return a Spans object, which you can use to
access the positions.
-Grant
On Jan 29, 2008, at 7:17 AM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote:
And how can I find the offsets of something like "f
> > And how can I find the offsets of something like "foo bar"?
> I think
> > this
> > will get tokenized into 2 terms and thus I have no chance to find
> > it, right?
>
> I wouldn't say no chance... TermVectorMapper would be good
> for this,
> as you can watch the terms as they are being
On Jan 28, 2008, at 4:04 PM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote:
Also, search the archives for Term Vector, as you will find
discussion
of it there.
Ah I see, I need to cast it to TermPositionVector. OK.
yep
You may also, eventually, be interested in the new
TermVectorMapper
> Also, search the archives for Term Vector, as you will find
> discussion
> of it there.
Ah I see, I need to cast it to TermPositionVector. OK.
> You may also, eventually, be interested in the new
> TermVectorMapper capabilities in 2.3 which should help speed up the
> processing of term
See IndexReader.getTermFreqVector() and various versions of that.
Also, search the archives for Term Vector, as you will find discussion
of it there. You may also, eventually, be interested in the new
TermVectorMapper capabilities in 2.3 which should help speed up the
processing of term ve
Sorry, this was a bit nonsense ;)
I store a document with a content field like this:
Document#add(new Field("content", someReader, TermVector.WITH_OFFSETS));
Later I search this document with an IndexSearcher and want the
TermPositions from this single document.
There is a IndexReader#termPosit
That seems to be the correct usage. Can you provide a self contained
unit test showing what you are doing or, at least, more supporting code?
-Grant
On Jun 24, 2007, at 5:14 PM, Lee Li Bin wrote:
Hi,
May I know how do I store TermVector?
When I set the last parameter to true, isn't it
Suggest you use lucene 2.1 or above
Andy
-Original Message-
From: Lee Li Bin [mailto:[EMAIL PROTECTED]
Sent: Monday, June 25, 2007 5:14 AM
To: java-user@lucene.apache.org
Subject: TermVector
Hi,
May I know how do I store TermVector?
When I set the last parameter to true, isn't i