lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Staveley (Tom)" <rstave...@seseit.com>
Subject Mixing compressed and uncompressed values
Date Fri, 14 Jul 2006 13:03:56 GMT
Is this a bad idea?

	String synopsis = /* ....may be any length between 0 and 400
characters */

	// Store, but don't index the synopsis
	// If the synopsis is > 150 characters, we should compress it
	Field field = new Field(
		"synopsis",synopsis
		,synopsis.length() > 150 ? Field.Store.COMPRESS :
Field.Store.YES
		,Field.Index.NO
		);
	field.setOmitNorms(true);
	doc.add(field);

i.e. to compress only long values and wind up with an index with a field
with a mixture of compressed an uncompressed values

Mime
View raw message