lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francisco A. Lozano" <floz...@gmail.com>
Subject Storing same field twice (analyzed+not-analyzed), sorting
Date Fri, 27 Apr 2012 10:17:58 GMT
Hi,

I'm storing a field two times, one analyzed and other non-analyzed, in
order to be able to query for terms and for exact keyword:

			// Analyzed version
			d.add(new Field(key, value, Store.NO, Index.ANALYZED,
					TermVector.YES));
			// Not-analyzed version
			d.add(new Field(key, value, Store.NO, Index.NOT_ANALYZED));

My first question is if this is supposed to cause problems somehow or
if it's OK.

The problem is that I'm getting strange results when sorting, most of
the documents seem correctly sorted but some of them appear at the
end. Am I doing something wrong?

Francisco A. Lozano

---------------------------------------------------------------------
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