lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppp c <peter.c.e...@gmail.com>
Subject Re: Modify Field.Index.NO to Field.Index.NOT_ANALYZED
Date Fri, 11 Nov 2011 05:38:39 GMT
terrible.

you have made a big mistake, since you in fact made the primary key
unsearchable.
There is no any other method, since deleteDocument, updateDocument both
need Term to be searchable.
The only way is during the traversal of all the docs and finding the
matched field and delete it.

On Fri, Nov 11, 2011 at 12:37 PM, Thanh Ha <javabytes@gmail.com> wrote:

> I indexed my document using Field.Index.NO as the field index type, so
> now I cannot search it to make updates.
> Here's how the document was added:
>
> Document doc = new Document();
> doc.add(new Field("content_id", "1234", Field.Store.YES,
> Field.Index.NO,  Field.TermVector.NO));
>
> The content_id is the primary key for my documents.
> Using updateDocument(Term,doc) won't work because the field must be
> indexed in order to match (?).
>
>
> Since I did store the value, is it possible to update this field index
> type to Field.Index.NOT_ANALYZED ?
>
>
> It will be very difficult to reindex, so any feedback is appreciated.
>
>
> Thanks,
> Tommy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message