Re: updating index

2009-12-04 Thread Ian Lea
writer.updateDocument(new Term("id", ""+i), doc); Read the javadocs! Haven't we been here before? -- Ian. On Fri, Dec 4, 2009 at 10:30 AM, m.harig wrote: > > hello all > >        how do i update my existing index to avoid my duplicates , this is > how am doing my indexing > >   doc.add(new F

Re: updating index

2007-03-10 Thread no spam
BTW Erick this works brilliantly with UN_TOKENIZED. SUPER fast :) On 2/25/07, Erick Erickson <[EMAIL PROTECTED]> wrote: Yes, I'm pretty sure you have to index the field (UN_TOKENIZED) to be able to fetch it with TermDocs/TermEnum! The loop I posted works like this for each term in the ind

Re: updating index

2007-03-01 Thread Doron Cohen
Daniel Noll <[EMAIL PROTECTED]> wrote on 01/03/2007 22:10:15: > > API IndexWriter.updateDocument() may be useful. > > Whoa, nice convenience method. > > I don't suppose the new document happens to be given the same ID as the > old one. That would make many people's lives much easier. :-) Oh no,

Re: updating index

2007-03-01 Thread Daniel Noll
Doron Cohen wrote: Once indexing the database_id field this way, also the newly added API IndexWriter.updateDocument() may be useful. Whoa, nice convenience method. I don't suppose the new document happens to be given the same ID as the old one. That would make many people's lives much easie

Re: updating index

2007-02-27 Thread no spam
Yes correct, I'll be using the new updateDocument() api call! Erick thanks for correcting my poor use of termdocs :) On 2/27/07, Doron Cohen <[EMAIL PROTECTED]> wrote: "Erick Erickson" <[EMAIL PROTECTED]> wrote on 25/02/2007 07:05:21: > Yes, I'm pretty sure you have to index the field (UN_TOK

Re: updating index

2007-02-26 Thread Doron Cohen
"Erick Erickson" <[EMAIL PROTECTED]> wrote on 25/02/2007 07:05:21: > Yes, I'm pretty sure you have to index the field (UN_TOKENIZED) to be able > to fetch it with TermDocs/TermEnum! The loop I posted works like this Once indexing the database_id field this way, also the newly added API IndexW

Re: updating index

2007-02-25 Thread Erick Erickson
Yes, I'm pretty sure you have to index the field (UN_TOKENIZED) to be able to fetch it with TermDocs/TermEnum! The loop I posted works like this for each term in the index for the field if this is one I want to update use a TermDocs to get to that document and operate on it. But

Re: updating index

2007-02-24 Thread no spam
I didn't fully understand your last post and why I wanted to do IndexReader.terms() then IndexReader.termDocs(). Won't something like this work? for (Business biz : updates) { Term t = new Term("id", biz.getId()+""); TermDocs tDocs = reader.termDocs(t);

Re: updating index

2007-02-21 Thread Erick Erickson
I think you can get MUCH better efficiency by using TermEnum/TermDocs. But I think you need to index (UN_TOKENIZED) your primary key (although now I'm not sure. But I'd be surprised if TermEnum worked with un-indexed data. Still, it'd be worth trying but I've always assumed that TermEnums only wor

Re: updating index - web application

2006-06-12 Thread Chris Lu
My approach, which I think is common, is to use Quartz sheduler. Chris - Instant Lucene Search on Any Databases/Applications http://www.dbsight.net On 6/12/06, Van Nguyen <[EMAIL PROTECTED]> wrote: I've been playing around with Lucene for a while now. I'm pretty com

Re: Updating index if there is a database changes

2006-05-04 Thread Yonik Seeley
On 5/3/06, Kiran Joisher <[EMAIL PROTECTED]> wrote: I m working on a project where I will use lucene to make a search engine on a database. I am new to lucene. I wrote a test program which indexes a table and searches the same.. but now I m stuck on how to update the index in case a database chan

RE: Updating index if there is a database changes

2006-05-03 Thread Kiran Joisher
Thanks Stephen, This was really helpful. Cheers, --Kiran -Original Message- From: Stephen Gray [mailto:[EMAIL PROTECTED] Sent: Thursday, May 04, 2006 4:11 AM To: java-user@lucene.apache.org Subject: Re: Updating index if there is a database changes Hi Kirin, Once you've up

Re: Updating index if there is a database changes

2006-05-03 Thread Stephen Gray
Hi Kirin, Once you've updated an index using IndexWriter or IndexReader you just need to close and re-open your IndexSearcher so that searching includes the changes. There is a great library callled LuceIndexAccessor at the link below that manages this for you. It creates an IndexReader/Writer

Re: Updating index if there is a database changes

2006-05-03 Thread Chris Lu
My approach is to select documents ordered by updated_date desc And only process documents newer than the ones already in the index. Chris Lu Full-Text Lucene Search for Any Databases/Applications http://www.dbsight.net On 5/3/06, Kiran Joisher <[EMAIL PROTE

Re: updating index

2006-02-16 Thread Grant Ingersoll
Revati, This sounds like a Hibernate problem, I suggest you refer to their documentation and forum. -Grant revati joshi wrote: Hi, i hve tried updating lucene index using Hibernate lifecycle class but not able to get the implementation of this class. www.hibernate.org - Using Lifec

Re: Updating Index.

2005-04-07 Thread Morus Walter
pashupathinath writes: >how can i traverse through the values stored in the > index and make sure that the new records are not > duplicated ? once i encounter the duplicate primary > key, i should be able to delete all the various fields > values associated with that primary key. > There's

Re: Updating Index.

2005-04-07 Thread Paul Elschot
On Friday 08 April 2005 07:42, pashupathinath wrote: > hi, > i've created an index for database records. the > problem is whenever i'm trying to update the database, > i mean adding or deleting records from the database i > want the index to be updated too. >right now, i am adding new documen