You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by bu...@apache.org on 2002/05/07 04:46:16 UTC
DO NOT REPLY [Bug 7912] -
Field.isIndexed() returns false for UnStored fields
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 otis@apache.org 2002-05-07 02:46 -------
I think you are right, this is a bug.
If a field is unstored and not indexed what is it?
It should be either stored, or indexed, or both.
However, I just tried tracking the code from Field -> Document -> IndexWriter ->
DocumentWriter -> FieldInfos and I couldn't see a bug there.
In your code (by the way, it's a little better to create an attachment than to
paste the code inline), check this part:
Enumeration en = doc.fields();
while (en.hasMoreElements())
{
Field field = (Field) en.nextElement();
boolean indexed = field.isIndexed();
if (this.printAllDocuments)
System.out.println("\t" + field.name() + ", isIndexed? :" + indexed);
The UnStored field is never retrieved by doc.fields().
However, if you copy that same snippet of code in the code right before
writer.addDocument(doc) is called you will see that different stuff is printed.
So this just confirms that there is something fishy there, but I can't find the
source of the bug right now.
If you find it, please send a context diff.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>