lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Riccardo Daviddi <rdavi...@gmail.com>
Subject How to get a list of field names of one doc?
Date Sat, 10 Sep 2005 16:44:50 GMT
Hy all,

I need to get a list of pair names-values (in two vector) of each fields a 
doc has, without knowing the names of the fields (an user can call fields as 
he wants).
Once I get the document by hits.doc(), Document has only a method fields() 
to get an enumeration, but it's not what I want (it's not only the names of 
the fields, it's names and values of the fields all together).
By now I am getting all the fields of an index by the 
IndexReader.getFieldNames() method and then manually testing if the document 
has each field. There is another way to know directly from a document all 
the field names the doc has?

thx
-- 
Riccardo Daviddi
University of Siena - Information Engeneering
rdaviddi@gmail.com

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