lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kumaran Ramasubramanian <kums....@gmail.com>
Subject IntField is not indexing properly - field properties changed to "just stored"
Date Thu, 17 Dec 2015 21:46:27 GMT
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

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