lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Varun Thacker <varunthacker1...@gmail.com>
Subject How to consume DocValues
Date Wed, 12 Dec 2012 17:51:46 GMT
I'm using trunk to try out DocValues.

Directory directory = new RAMDirectory();

IndexWriterConfig iwConfig = new IndexWriterConfig(
  Version.LUCENE_41, new StandardAnalyzer(Version.LUCENE_41));

IndexWriter iw  = new IndexWriter(directory, iwConfig);
Document doc = new Document();
IntDocValuesField numberField = new IntDocValuesField("number", 1);
doc.add(numberField);

iw.commit();
iw.close();

IndexReader reader = DirectoryReader.open(directory);

AtomicReader aReader = SlowCompositeReaderWrapper.wrap(reader);

DocValues docValues = aReader.docValues("number");
Source source = docValues.getSource();


docValues is null. Am I using the API correctly?

Also what are the other ways to open a AtomicReader read DocValues



-- 


Regards,
Varun Thacker
http://www.vthacker.in/

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