lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ishan Chattopadhyaya <>
Subject Obtain list of indexed fields from IndexWriter
Date Fri, 01 Jul 2016 16:33:01 GMT
If an update to a non-existent dv field is attempted, IndexWriter throws an
"can only update existing numeric-docvalues fields!".

This exception is thrown after checking with the globalFieldNumberMap
(which is obtained from the SegmentInfos).

Is there a way, given an IndexWriter instance, I can obtain a list of
fields that have been indexed through this writer (so that I can check
before attempting to update a non-existing DV field)? In absence of
something that I'm missing that exists already, is it possible to expose
either the segmentInfos or the globalFieldNumberMap as a public API?


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