lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Krupansky <jack.krupan...@gmail.com>
Subject Re: Need change one field type from IntField to String including indexOptions to store positions & Norms
Date Thu, 17 Dec 2015 15:23:46 GMT
The standard answer is that you need to reindex all of your data.

-- Jack Krupansky

On Thu, Dec 17, 2015 at 6:10 AM, Kumaran Ramasubramanian <kums.134@gmail.com
> wrote:

> Dear All
>
>  i am using lucene 4.10.4. Is there any more information i missed to
> provide? Please let me know.
>
>
> --
> Kumaran R*​*
>
>
>
>
> On Wed, Dec 16, 2015 at 10:35 PM, Kumaran Ramasubramanian <
> kums.134@gmail.com> wrote:
>
> >
> > Hi All,
> >
> > Previous Post -
> > http://www.gossamer-threads.com/lists/lucene/java-user/289159
> >
> >       i have indexed one field "STATUS" as both IntField & String field
> in
> > same index. Now i want to take IntField containing documents and change
> the
> > value of field "STATUS" to string with norms & positions ( to achieve
> > phrase query).
> >
> > But even if i delete that field and index again as String field, ​*STATUS
> > field property of "omitNorms & no positions" are not changing *( which
> > are set when it was IntField)
> >
> > There are around 2 million documents in that index. indexed STATUS field
> > as
> > IntField - in 1 million documents
> > Analyzed String Field - in another 1 million doucments
> >
> > Basically, am trying to change STATUS field into only one type ( to solve
> > http://www.gossamer-threads.com/lists/lucene/java-user/289159)
> >
> >
> > *In index when it was IntField*
> >
> > <stored,indexed,tokenized,omitNorms,indexOptions=DOCS_ONLY<STATUS:222>
> >
> >
> >
> > *​​when​ i try to change to string from​ IntField*
> >
> > ​stored,indexed,tokenized<STATUS:lucene index cleared>
> >
> >
> >
> >
> > *This is how STATUS field looks again in index*
> >
> > ​<stored,indexed,tokenized,omitNorms,indexOptions=DOCS_ONLY<STATUS:lucene
> >> index cleared>​
> >>
> > ​
> >
> >
> >
> > *code details i am using:*
> >
> > for IntField,
> > IntField intField = new IntField("STATUS", Integer.parseInt("
> > ​222​
> > "), Field.Store.YES);
> > doc
> > ​ument​
> > .add(intField);
> >
> > ​for string field,
> > ​document.add(new Field("STATUS", "lucene index cleared",
> Field.Store.YES,
> > Field.Index.ANALYZED));
> >
> >
> >
> > ​Thanks in advance​ :-)
> >
> >
> >
> > --
> > ​K​
> > umaran
> > ​R​
> >
> >
> >
> >
>

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