Thanks Ian , it works , thanks a lot.
Ian Lea wrote:
>
> Try updateDocument(new Term("id", ""+i), doc).
>
> See javadocs for Term constructors.
>
>
>
> --
> Ian.
>
>
> On Tue, Nov 10, 2009 at 9:47 AM, m.harig wrote:
>>
>> Thanks again
>>
>> this is my code ,
>>
>> doc.add(new Field("id",
Ian got it :)
simon
On Tue, Nov 10, 2009 at 10:58 AM, Ian Lea wrote:
> Try updateDocument(new Term("id", ""+i), doc).
>
> See javadocs for Term constructors.
>
>
>
> --
> Ian.
>
>
> On Tue, Nov 10, 2009 at 9:47 AM, m.harig wrote:
>>
>> Thanks again
>>
>> this is my code ,
>>
>> doc.add(new Fie
Try updateDocument(new Term("id", ""+i), doc).
See javadocs for Term constructors.
--
Ian.
On Tue, Nov 10, 2009 at 9:47 AM, m.harig wrote:
>
> Thanks again
>
> this is my code ,
>
> doc.add(new Field("id",""+i,Field.Store.YES,Field.Index.NOT_ANALYZED));
>
> doc.add(new Field("title", index
Thanks simon ,,
this is my code
doc.add(new Field("id",""+i,Field.Store.YES,Field.Index.NOT_ANALYZED));
doc.add(new Field("title", indexForm.getTitle(), Field.Store.YES,
Field.Index.ANALYZED));
doc.add(new Field("conte
Thanks again
this is my code ,
doc.add(new Field("id",""+i,Field.Store.YES,Field.Index.NOT_ANALYZED));
doc.add(new Field("title", indexForm.getTitle(), Field.Store.YES,
Field.Index.ANALYZED));
doc.add(new Field("contents",
On Tue, Nov 10, 2009 at 10:22 AM, m.harig wrote:
>
> Thanks simon
>
> How I do get the unique ID ? will it be added to the index?
There is no such thing build into lucene. You need to generate your
own unique ID. Make sure you do NOT use the document ID as it is
volatile and is likely to change
Thanks simon
How I do get the unique ID ? will it be added to the index?
Simon Willnauer wrote:
>
> You need some kind of unique ID for you documents like a primary key in a
> RDB.
> If you have something like that you can call
> IndexWriter#updateDocument(uniqueIDTerm, document) this wil
You need some kind of unique ID for you documents like a primary key in a RDB.
If you have something like that you can call
IndexWriter#updateDocument(uniqueIDTerm, document) this will delete
the old document and add the new one.
simon
On Tue, Nov 10, 2009 at 10:05 AM, m.harig wrote:
>
> hello a