UpdateIndex

2005-08-22 Thread dozean
Hi, i wrote an Index update, where first the IndexReader delete all files from index which are changed. Than add documents which are not in the index! Alone the deletion take so long, because i have 2 "for" loops! file = array with all files in a directory for (int i = 0; i Integer.parseInt(r

RE: UpdateIndex

2005-08-22 Thread Mordo, Aviran (EXP N-NANNATEK)
: Monday, August 22, 2005 9:31 AM To: java-user@lucene.apache.org Subject: UpdateIndex Hi, i wrote an Index update, where first the IndexReader delete all files from index which are changed. Than add documents which are not in the index! Alone the deletion take so long, because i have 2 &quo

RE: UpdateIndex

2005-08-22 Thread dozean
field but i can not search after the path! It won't work and i don't know why? Have you an idea? Derya > --- Ursprüngliche Nachricht --- > Von: "Mordo, Aviran (EXP N-NANNATEK)" <[EMAIL PROTECTED]> > An: java-user@lucene.apache.org > Betreff: RE: UpdateIndex &g

RE: UpdateIndex

2005-08-22 Thread Mordo, Aviran (EXP N-NANNATEK)
ssage- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 22, 2005 10:22 AM To: java-user@lucene.apache.org Subject: RE: UpdateIndex Yeah, that is a good idea, but i have the following problem of doing the update that way. I can not query the index for the file name, becau

Re: UpdateIndex

2005-08-22 Thread Otis Gospodnetic
Yes, this is not how you should do it. Use reader.delete(Term) method to delete documents: http://lucene.apache.org/java/docs/api/org/apache/lucene/index/IndexReader.html#delete(org.apache.lucene.index.Term) Otis --- [EMAIL PROTECTED] wrote: > Hi, > > i wrote an Index update, where first the In

Re: UpdateIndex

2005-08-22 Thread Ray Tsang
This could be off topic, but I made something that updates indices that worked like the following, wonder if anybody has the same ideas? I found something like IndexAccessControl in the mailing list before. An implementation of the following uses IAC. ManagedIndex index = ManagedIndex.getInstanc

Re: UpdateIndex

2005-08-23 Thread Derya Kasapoglu
gt; Von: Ray Tsang <[EMAIL PROTECTED]> An: java-user@lucene.apache.org Betreff: Re: UpdateIndex > Datum: Tue, 23 Aug 2005 09:48:59 +0800 > > This could be off topic, but I made something that updates indices > that worked like the following, wonder if anybody has the same idea

Re: UpdateIndex

2005-08-23 Thread Miles Barr
On Tue, 2005-08-23 at 12:38 +0200, Derya Kasapoglu wrote: > i query the index for the path of the files in the directory and compare the > dates. > But i have a Problem! > I find out the files which have changed but i can not delete the documet > from the index, i don't know why! > > In the Field

Re: UpdateIndex

2005-08-23 Thread Derya Kasapoglu
; An: java-user@lucene.apache.org > Betreff: Re: UpdateIndex > Datum: Tue, 23 Aug 2005 11:47:22 +0100 > > On Tue, 2005-08-23 at 12:38 +0200, Derya Kasapoglu wrote: > > i query the index for the path of the files in the directory and compare > the > > dates. > > But i hav

Re: UpdateIndex

2005-08-23 Thread Miles Barr
On Tue, 2005-08-23 at 12:54 +0200, Derya Kasapoglu wrote: > Yes, it returns null. > But this is a little bit funny because the searching is correct > and it finds the document whitch have changed! > So want can i do!? > > Is there an opportunity to get the document id? It can't return null since

Re: UpdateIndex

2005-08-23 Thread Derya Kasapoglu
ava-user@lucene.apache.org > Betreff: Re: UpdateIndex > Datum: Tue, 23 Aug 2005 12:09:07 +0100 > > On Tue, 2005-08-23 at 12:54 +0200, Derya Kasapoglu wrote: > > Yes, it returns null. > > But this is a little bit funny because the searching is correct > > and it find

Re: UpdateIndex

2005-08-23 Thread Derya Kasapoglu
> --- Ursprüngliche Nachricht --- > Von: "Derya Kasapoglu" <[EMAIL PROTECTED]> > An: java-user@lucene.apache.org > Betreff: Re: UpdateIndex > Datum: Tue, 23 Aug 2005 13:33:05 +0200 (MEST) > > I meant the reader.hasDeletions() returns null and reader.delete(term

Re: UpdateIndex

2005-08-23 Thread Miles Barr
On Tue, 2005-08-23 at 13:53 +0200, Derya Kasapoglu wrote: > Thank you for your help!!! > > I try it without Analyzer! > > document.add(Field.Keyword("path", file[i].getAbsolutePath())); > > then > > Term term = new Term("path", file[i].getAbsolutePath()); > Query query = new TermQuery(term); >

Re: UpdateIndex

2005-08-24 Thread dozean
Hi, what can i do with files which are deleted from the document directory? How can i delete them from the index, if i start an update? Currently i start a search in the index for existing documents and delete them, when they have changed! After that session i add all the documents, which are not

Re: UpdateIndex

2005-08-24 Thread Daniel Naber
On Wednesday 24 August 2005 12:47, [EMAIL PROTECTED] wrote: > what can i do with files which are deleted from the document directory? > How can i delete them from the index, if i start an update? See IndexHTML.java in the Lucene demos. Regards Daniel ---

Re: UpdateIndex

2005-08-24 Thread Brian
Would you want to update, or could you just append to an existing Index? Thanks, B --- Ray Tsang <[EMAIL PROTECTED]> wrote: > This could be off topic, but I made something that > updates indices > that worked like the following, wonder if anybody > has the same ideas? > I found something like In

Re: UpdateIndex

2005-08-29 Thread dozean
Hi, over again a question about updating! I update my index by first deletion all the documents from index which are not anymore in the document directories, then i delete all documents from index which have changed and at last i add all documents to the index which are not in the index but in the

RE: UpdateIndex

2005-08-29 Thread Mordo, Aviran (EXP N-NANNATEK)
Subject: Re: UpdateIndex Hi, over again a question about updating! I update my index by first deletion all the documents from index which are not anymore in the document directories, then i delete all documents from index which have changed and at last i add all documents to the index which are not

RE: UpdateIndex

2005-08-29 Thread dozean
for (int i=0; i --- Ursprüngliche Nachricht --- > Von: "Mordo, Aviran (EXP N-NANNATEK)" <[EMAIL PROTECTED]> > An: java-user@lucene.apache.org > Betreff: RE: UpdateIndex > Datum: Mon, 29 Aug 2005 09:28:59 -0400 > > After you delete / add documents, you need to g

RE: UpdateIndex

2005-08-29 Thread Mordo, Aviran (EXP N-NANNATEK)
No, just at the end of the delete loop get a new reader instance. Aviran http://www.aviransplace.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 10:10 AM To: java-user@lucene.apache.org Subject: RE: UpdateIndex for (int i=0; i

RE: UpdateIndex

2005-08-29 Thread Derya Kasapoglu
Thank you for your help! But it doesn't work that way!! My code is: IndexReader reader = IndexReader.open(dir); for (int i=0; i --- Ursprüngliche Nachricht --- > Von: "Mordo, Aviran (EXP N-NANNATEK)" <[EMAIL PROTECTED]> > An: java-user@lucene.apache.org > Betreff