lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7912] - Field.isIndexed() returns false for UnStored fields
Date Tue, 07 May 2002 20:50:21 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7912>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7912

Field.isIndexed() returns false for UnStored fields





------- Additional Comments From cutting@apache.org  2002-05-07 20:50 -------
An un-stored field does not exist in the Document object returned by a search.  
I don't agree that it should.

What would be nice is to be able to enumerate all of the fields indexed.  
Perhaps the following methods should be added to IndexReader to support this:
  String[] getFieldNames();
  String[] getIndexedFieldNames();

Would that meet your needs?

If so, it would be fairly simple to implement.  Abstract methods would be added 
to IndexReader, with implementations in SegmentReader and SegmentsReader.

The SegmentReader implementation could just do something like:
    for (int i = 0; i < fieldInfos.size(); i++) {
      FieldInfo fi = fieldInfos.fieldInfo(i);
      ...
    }

The SegmentsReader implementation would need to add a FieldInfos field, 
construct it by using FieldInfos.add(FieldInfos), then use an implementation 
like SegmentReader.

Doug

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message