Re: Adding fields with same field type complains that they have different term vector settings

2020-06-30 Thread Michael McCandless
eeny" > > > > Sent: Monday, 29 June, 2020 15:23:43 > > Subject: Re: Adding fields with same field type complains that they have > > different term vector settings > > > Hi Albert, > > Unfortunately, you have fallen into a common and sneaky Lucene trap.

Re: Adding fields with same field type complains that they have different term vector settings

2020-06-29 Thread Albert MacSweeny
Regards, Albert > From: "Michael McCandless" > To: "java-user" , "albert macsweeny" > > Sent: Monday, 29 June, 2020 15:23:43 > Subject: Re: Adding fields with same field type complains that they have > different term vector settings > Hi A

Re: Adding fields with same field type complains that they have different term vector settings

2020-06-29 Thread Michael McCandless
Hi Albert, Unfortunately, you have fallen into a common and sneaky Lucene trap. The problem happens because you loaded a Document from the index's stored fields (the one you previously indexed) and then tried to modify that one and re-index. Lucene does not guarantee that this will work, because

Adding fields with same field type complains that they have different term vector settings

2020-06-29 Thread Albert MacSweeny
Hi, I'm upgrading a project to lucene 8.5.2 which had been using 3.0.0. Some tests are failing with a strange issue. The gist of it is, we create fields that need position and offset information. Inserting one field works ok, but then searching for the document and adding another value for the

Re: Are term vector position returned ordered in Lucene 3.6?

2014-02-03 Thread Michael McCandless
term vectors position in Lucene 3.6. First I extract the term > vector and get the indexes from the "indexOf" method as suggested for > extracting the position. > > TermPositionVector termFreqVector = (TermPositionVector) > reader.getTermFreqVector(i, termField); >

Are term vector position returned ordered in Lucene 3.6?

2014-02-03 Thread andi rexha
Hi, I am extracting term vectors position in Lucene 3.6. First I extract the term vector and get the indexes from the "indexOf" method as suggested for extracting the position. TermPositionVector termFreqVector = (TermPositionVector) reader.getTermFreqVector(i, termField); Stri

Re: Term vector Lucene 4.2

2013-04-02 Thread Adrien Grand
(since the docs enums would have several documents). > 2) How do I get the offsets for the term vector? I have tried to iterate over > the docsAndPositions but I get the following exception: > > Exception in thread "main" java.lang.IllegalStateException: Position enum not &

RE: Term vector Lucene 4.2

2013-04-02 Thread andi rexha
t should be the same. 2) How do I get the offsets for the term vector? I have tried to iterate over the docsAndPositions but I get the following exception: Exception in thread "main" java.lang.IllegalStateException: Position enum not started Thanks in advance, Andi > From: jpo

Re: Term vector Lucene 4.2

2013-04-02 Thread Adrien Grand
Hi Andi, Here is how you could retrieve positions from your document: Terms termVector = indexReader.getTermVector(docId, fieldName); TermsEnum reuse = null; TermsEnum iterator = termVector.iterator(reuse); BytesRef ref = null; DocsAndPositionsEnum docsAndPositions = null;

Term vector Lucene 4.2

2013-04-02 Thread andi rexha
Hi, I have a problem while trying to extract term vector's attributes (i.e. position of the terms). What I have done was: Terms termVector = indexReader.getTermVector(docId, fieldName); TermsEnum reuse = null; TermsEnum iterator = termVector.iterator(reuse); PositionIncr

Index a manually constructed term vector as a Lucene document

2011-07-10 Thread Xiyang Chen
Hi, I have some term vectors each with a number of (term, score) pairs. These vectors were derived from text documents which are no longer obtainable. I want to be able to add these vectors as individual documents to Lucene index. I understand this can be accomplished by writing my own analyzer c

Re: term vector - WITH_POSITIONS_OFFSETS vs YES in terms of search performance

2010-11-30 Thread Michael McCandless
The performance impact should only be at indexing time, unless you actually retrieve the vectors for some number of hits at search time. Mike On Tue, Nov 30, 2010 at 2:28 PM, Maricris Villareal wrote: > Hi, > > Could someone tell me the effect (if any) of having term vectors set to > WITH_POSITI

term vector - WITH_POSITIONS_OFFSETS vs YES in terms of search performance

2010-11-30 Thread Maricris Villareal
Hi, Could someone tell me the effect (if any) of having term vectors set to WITH_POSITIONS_OFFSETS vs YES in terms of search performance? I did some testing and the results were inconclusive. In one case, WITH_POSITIONS_OFFSETS was searched faster than YES, in all others, it was the reverse. Is

How to obtain the freq term vector of a field from a remote index ?

2008-02-28 Thread Ariel
Hi folks: I need to know how to get the frequency term vector of a field from a remote index in another host. I know that *IndexSearcher *class has a method named *getIndexReader().getTermFreqVector(idDoc, fieldName) *to know the the term frequency vector of certain field* *but I am using

RE: How to open the term vector storage?

2007-07-20 Thread Jun.Chen
Thank you. Document 1.9 is very useful. -Original Message- From: Chris Hostetter [mailto:[EMAIL PROTECTED] Sent: 2007年7月20日 10:18 上午好,Daniel To: Lucene Users Subject: RE: How to open the term vector storage? : I also have this problem... : Field.Text : Field.Keyword : ... : I cannot

RE: How to open the term vector storage?

2007-07-19 Thread Chris Hostetter
: I also have this problem... : Field.Text : Field.Keyword : ... : I cannot find this method in lucene2.0 API please see the FAQ "How do I get code written for Lucene 1.4.x to work with Lucene 2.x?" http://wiki.apache.org/lucene-java/LuceneFAQ#head-86d479476c63a2579e867b75d4faa9664ef6cf4d -H

RE: How to open the term vector storage?

2007-07-19 Thread Jun.Chen
I also have this problem... Field.Text Field.Keyword ... I cannot find this method in lucene2.0 API -Original Message- From: savageboy [mailto:[EMAIL PROTECTED] Sent: 2007年7月20日 9:46 上午好,Daniel To: java-user@lucene.apache.org Subject: How to open the term vector storage? Hello

Re: How to open the term vector storage?

2007-07-19 Thread savageboy
o the same work for Lucene2.0 > Could you help me? > Thank you very much! > -- View this message in context: http://www.nabble.com/How-to-open-the-term-vector-storage--tf4114700.html#a11701017 Sent from the Lucene - Java Users mailing list archive at Nabble.com. --

How to open the term vector storage?

2007-07-19 Thread savageboy
Hello, everyone: doc.add(Field.Unstored("subject", subject, true)); This syntax above is for Lucene1.4 I need the syntax which could do the same work for Lucene2.0 Could you help me? Thank you very much! -- View this message in context: http://www.nabble.com/How-to-open-the-t

Re: Term Vector Question

2006-03-22 Thread Daniel Cortes
Ok, thks. I read another time my question and it's normally I didn't obtain any reply :D .Excuseme My index contain fields like CONTAIN,GROUPID,USERID,TOOL. My question is how can I do to obtain a list of terms contained in a group of results. For example, I want all the terms in field CONTAIN

Re: Term Vector Question

2006-03-21 Thread Grant Ingersoll
Daniel, Not sure I understand your problem, could you expand on it more, please. Daniel Cortes wrote: Hi everybody, How can I do to obtain Terms of an specific Querry( for example all the terms of a specific group, field " ID_GROUP" ) The only thing that now I think to do is a search and obtai

Term Vector Question

2006-03-20 Thread Daniel Cortes
Hi everybody, How can I do to obtain Terms of an specific Querry( for example all the terms of a specific group, field " ID_GROUP" ) The only thing that now I think to do is a search and obtain for every hits their term frequency and create a TreeSet with this. I supose that lucene give me anoth

Re: Term Vector

2006-03-01 Thread Rajesh Munavalli
> Hi all, > > Can a vector of terms be contructed in Lucene. A term vector for a > document, for example, would contain the indexed terms of that document. > Also, is it possible to get a handle to the actual term-document matrix. > > T

Term Vector

2006-03-01 Thread Srikanth Kallurkar
Hi all, Can a vector of terms be contructed in Lucene. A term vector for a document, for example, would contain the indexed terms of that document. Also, is it possible to get a handle to the actual term-document matrix. Thanks in advance, Srikanth