Hi All,

i am using lucene 4.10.4. i am using below code to index IntField. All
properties of IntField is vanished except stored. Any help is much
appreciated.


IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_4_10_4, new
> ClassicAnalyzer(Version.LUCENE_30, new StringReader("")));
> iwc.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);
> IndexWriter writer = new IndexWriter(NIOFSDirectory.open(new
> File(indexDir)), iwc);
> Document doc = new Document();
> IntField intField = new IntField("STATUS", Integer.parseInt("178"),
> Field.Store.YES);
> doc.add(intField);

writer.addDocument(doc);

writer.forceMerge(1);

writer.close();




*document looks like this before adding to index*

stored,indexed,tokenized,omitNorms,indexOptions=DOCS_ONLY,numericType=INT,numericPrecisionStep=8<STATUS:178
> ​
>

*​​document looks like this before adding to index​*

stored<STATUS:178>




​Thanks in advance​ :-)




--
​ ​
Kumaran R

Reply via email to