lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Powers <jpow...@configureone.com>
Subject Custom sort/basic question
Date Mon, 21 Nov 2005 23:01:14 GMT
If I add keywords to a document at the same time, will they stay in that
order?


Create New doc A
doc.add(Field.Text("category", "toys"));
doc.add(Field.Text("sequence", "235"));

doc.add(Field.Text("category", "bears"));
doc.add(Field.Text("sequence", "63"));

doc.add(Field.Text("category", "trucks"));
doc.add(Field.Text("sequence", "56"));



Create New doc B
doc.add(Field.Text("category", "computers"));
doc.add(Field.Text("sequence", "7"));

doc.add(Field.Text("category", "bears"));
doc.add(Field.Text("sequence", "12"));

doc.add(Field.Text("category", "trucks"));
doc.add(Field.Text("sequence", "772"));

I want to sort on the right sequence number, so I need to find the right
category.   If I iterator through doc.getFields( category) and find the
category I want is #2, then can I get sequence #2 and know its the right
one?

Or does everything get jumbled up in the indexing process?


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message