lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cauvery Developer" <kaveriopensou...@gmail.com>
Subject Document.getField(field).stringValue() behavior
Date Sat, 01 Dec 2007 08:12:35 GMT
Hi,
I am working with demo and I am displaying the search results as :

Hits ht = is.search(q);
for (int i = 0; i <= ht.length(); i++) {
     Document hitDoc = ht.doc(i);
     queryResult.add(hitDoc.getField("name").toString() + "~"
     + hitDoc.getField("date").toString());
System.out.println(queryResult) ;
}

I get the following output :

stored/uncompressed,indexed<name:HWORLD>~stored/uncompressed,indexed<date:Fri
Nov 30 23:43:50 PST 2007>

The result "HWORLD" and "Fri Nov 30 23:43:50 PST 2007" is correct. But, I
was under the impression that the output would simply be

HWORLD~Fri Nov 30 23:43:50 PST 2007

Therefore, should the output of Document.getField(field).stringValue()
behavior be further parsed to get directly to the term that was added  ?

Thanks and regards,
Nags

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