Re: TermVector

2008-01-29 Thread Grant Ingersoll
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

RE: TermVector

2008-01-29 Thread spring
> > 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

Re: TermVector

2008-01-28 Thread Grant Ingersoll
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

RE: TermVector

2008-01-28 Thread spring
> 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

Re: TermVector

2008-01-28 Thread Grant Ingersoll
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

RE: TermVector

2008-01-28 Thread spring
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

Re: TermVector

2007-06-25 Thread Grant Ingersoll
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

RE: TermVector

2007-06-24 Thread Liu_Andy2
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