Lucene index update

2010-10-20 Thread Nilesh Vijaywargiay
I've written a blog regarding a work around for updating index in Lucene using parallel reader. It's explained with results and pictures. It would be great if you have a look at it. The link: http://the10minutes.blogspot.com/2010/10/lucene-index-update.html

Lucene index update

2007-01-04 Thread Ivan Vasilev
Hi All, I want to update some documents in existing indexes by adding a new field to each of their documents. The documents contained in the indexes have some fields that are indexed and NOT stored. The new field that will be added will contain some metadata and will be Stored and not indexe

Re: Lucene index update

2010-10-27 Thread Pulkit Singhal
Look interesting, what is the merit in having a second index in order to keep the document id the same? Perhaps I have misunderstood. Just want to understand your motivation here. On Wed, Oct 20, 2010 at 2:57 PM, Nilesh Vijaywargiay wrote: > I've written a blog regarding a work around for updati

Re: Lucene index update

2010-10-27 Thread Nilesh Vijaywargiay
Pulkit, Parallel reader takes the union of all fields for a given id. Thus if I want to add a field or modify a field of a document which has id 2 in index1, I need to createa a document with id 2 in index2 with the fields I want to add/modify. Thus parallel reader would treat them as fields of a s

Re: Lucene index update

2010-10-27 Thread Pulkit Singhal
But why do you feel the need to have a parallel reader that combines result sets across two indices based on docId? On Thu, Oct 28, 2010 at 12:17 AM, Nilesh Vijaywargiay < nilesh.vi...@gmail.com> wrote: > Pulkit, > Parallel reader takes the union of all fields for a given id. Thus if I > want > t

Re: Lucene index update

2010-10-27 Thread Nilesh Vijaywargiay
One major reason is to update a field or rather shadow a field. i have a field named "testField" in index1 and i want to update that field. When I update, I want only the new value to be reflected, not the value in old field. now parallelreader starts from the latest index, i.e index2 and searches

Re: Lucene index update

2007-01-04 Thread Erick Erickson
for approach <2>, I *think* you can extract information about unstored data by playing with TermDocs/TermEnums. Conceptually, the idea is to go through all the terms and, for document (lucene ID) 1 find the terms that appear in document 1 and order them by their termpositions. Repeat for document

Re: Lucene index update

2007-01-05 Thread Ivan Vasilev
04, 2007 5:40 PM Subject: Re: Lucene index update for approach <2>, I *think* you can extract information about unstored data by playing with TermDocs/TermEnums. Conceptually, the idea is to go through all the terms and, for document (lucene ID) 1 find the terms that appear in docume

Re: Lucene index update

2007-01-05 Thread Erick Erickson
Ivan - Original Message - From: "Erick Erickson" <[EMAIL PROTECTED]> To: Sent: Thursday, January 04, 2007 5:40 PM Subject: Re: Lucene index update > for approach <2>, I *think* you can extract information about unstored > data > by playing with TermDocs/TermEn

Synchronous Lucene index update tests occasionally fail

2016-06-23 Thread Baskakov Daniel
Originally i've posted the question at stackoverflow.com but without any reply. So I hope someone can help me in the official list. I'm testing that dynamic changes of the domain model reflects at the Lucene index. Special event listeners (synchronous, no multithreading here) are executed when the

Re: Synchronous Lucene index update tests occasionally fail

2016-06-23 Thread Michael McCandless
You must reopen your IndexReader to see recent changes to the index. But, IW.commit after each indexing op is very costly. It's much better to get near-real-time readers, e.g. from a SearcherManager that you pass your IW instance too, after each set of changes that you now need to search. As lon

Re: Synchronous Lucene index update tests occasionally fail

2016-06-27 Thread Baskakov Daniel
Thank you Mike. Commit is performed after each indexing op in unit tests only: public void commitNow() throws IOException { if (getIndexWriter().hasUncommittedChanges()) { getIndexWriter().commit(); } } In production environment I have a timer that performs commit periodi

Re: Synchronous Lucene index update tests occasionally fail

2016-06-27 Thread Michael McCandless
Can you boil this down to a small standalone test case showing the issue? Mike McCandless http://blog.mikemccandless.com On Mon, Jun 27, 2016 at 4:03 AM, Baskakov Daniel wrote: > Thank you Mike. > > Commit is performed after each indexing op in unit tests only: > > public void commitNow() th

Re: Synchronous Lucene index update tests occasionally fail

2016-06-27 Thread Baskakov Daniel
I've just noticed that not only dynamic adding/removing entities tests fail, but also a simple indexing. Here is a boiled down structure of the test: @BeforeClass public static void beforeClass() throws Exception { // ContextManager is a domain model contextManager = createContextMa

Re: Synchronous Lucene index update tests occasionally fail

2016-06-27 Thread Michael McCandless
It looks like you have a casing issue maybe? You indexed variableWithHelpString. But searched for variablewithhelpstring* Mike McCandless http://blog.mikemccandless.com On Mon, Jun 27, 2016 at 5:07 AM, Baskakov Daniel wrote: > I've just noticed that not only dynamic adding/removing entities

Re: Synchronous Lucene index update tests occasionally fail

2016-06-28 Thread Daniq
Can casing issue appear randomly? Because tests not fail constantly, they are blinking. Daniel. -- View this message in context: http://lucene.472066.n3.nabble.com/Synchronous-Lucene-index-update-tests-occasionally-fail-tp4283970p4284657.html Sent from the Lucene - Java Users mailing list

Re: Synchronous Lucene index update tests occasionally fail

2016-06-28 Thread Michael McCandless
linking. > > Daniel. > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Synchronous-Lucene-index-update-tests-occasionally-fail-tp4283970p4284657.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > --

Re: Synchronous Lucene index update tests occasionally fail

2016-06-28 Thread Daniq
Tue, Jun 28, 2016 at 4:04 AM, Daniq < > gdaniq@ > > wrote: > >> Can casing issue appear randomly? Because tests not fail constantly, they >> are >> blinking. >> >> Daniel. >> >> >> >> -- >> View this message in context: >&

Re: Synchronous Lucene index update tests occasionally fail

2016-08-15 Thread Daniq
>> > wrote: >> >>> Can casing issue appear randomly? Because tests not fail constantly, >>> they >>> are >>> blinking. >>> >>> Daniel. >>> >>> >>> &

Re: Synchronous Lucene index update tests occasionally fail

2016-08-15 Thread Michael McCandless
t;> > >>> Can casing issue appear randomly? Because tests not fail constantly, > >>> they > >>> are > >>> blinking. > >>> > >>> Daniel. > >>> > >>> > >>> > >>> -- > >>