lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: How to get all field names
Date Tue, 12 Nov 2002 19:11:43 GMT
This would not be hard to implement.

It would take something like:

public abstract String[] IndexReader.getFieldNames();

This would need to be implemented in two classes, SegmentReader and 
SegmentsReader.  The former would just access its fieldInfos field to 
list fields.  The latter would iterate through its readers field, 
collecting all of the field names, and finally return them as an array.

Would someone like to contribute diffs for this?


Ype Kingma wrote:
> On Tuesday 12 November 2002 18:58, Rob Outar wrote:
>>Enumeration fields()
>>          Returns an Enumeration of all the fields in a document.
> Yes, but it seems there is no such enumerator for a complete index.
> Regards,
> Ype
>>-----Original Message-----
>>From: Christoph Kiehl []
>>Sent: Tuesday, November 12, 2002 4:11 AM
>>Subject: How to get all field names
>>I was wondering if there is a possibility to get a list of all field names
>>that have ever been used to index a document? This way I could filter out
>>some special fields, like identity and such, and do a search over the
>>remaining. That would give me total freedom to choose any document
>>structure and have all fields searched. Is this possible? Or do anyone of
>>you have a better way achieving that?
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

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

View raw message