lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Serebrennikov <>
Subject Re: Retrieving Field info from an index
Date Thu, 21 Mar 2002 17:49:20 GMT
>>>Lex Lawrence wrote:
>>>>You miss my point.  The value of an "unstored" Field is not stored in the
>>>>index, however it's name most certainly is.  That's what I'm interested in.
>>>>What I'd like to know if there is a way to get the names of all searchable
>>>>Fields in an index.
>>>Ok, now I get it, but I don't know that. Lucene source will tell you the
>I've just checked and I don't think this is available. If it isn't, it 
>shouldn't be to hard to add. The information is (at least) in the 
>SegmentIndexReader, which has an instance of FieldInfos object. That 
>object has size() which will give you the number of fields and it also 
>has fieldName(int number) which will give you the name of the field. I 
>don't think these are available through the IndexReader interface, so it 
>would need to be extended in some way. Maybe just add a method to return 
>the field names and then implement it in the SegmentReader and in the 
>SegmentsReader (which will combine the fields across all segments).

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message