lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kumaran Ramasubramanian <kums....@gmail.com>
Subject Need change one field type from IntField to String including indexOptions to store positions & Norms
Date Wed, 16 Dec 2015 17:05:44 GMT
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