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); reader.delete(term); so is better! :) and it works!!!! > --- 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) > returns 0. > > So...! > I store the path that way in the index: > document.add(Field.Text("pathLC", file[i].getAbsolutePath())); > and i use the StandardAnalyzer. > I can not search for the path if i store it as Keyword like that: > document.add(Field.Keyword("pathLC", > file[i].getAbsolutePath().toLowerCase())); > so i store it as a Text!!! > > so i think i have to use the analyzer bevor i call delete(term) ? > i'm right? > > > > --- Ursprüngliche Nachricht --- > > Von: Miles Barr <[EMAIL PROTECTED]> > > An: java-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 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 the return type is 'int'. But assuming you > > meant 0, that means the term isn't matching. The most likely cause is > > you used a analyzer when first creating the document, which would have > > altered the value of 'pathLC' to be something slightly different. > > > > What analyzer did you pass to the IndexWriter? > > > > Also you shouldn't rely on the document ID because it is not fixed for a > > given document. I believe it changes when you optimize the index. > > > > > > > > > > -- > > Miles Barr <[EMAIL PROTECTED]> > > Runtime Collective Ltd. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! > Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse für Mail, Message, More +++ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]