lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beard, Brian" <Brian.Be...@mybir.com>
Subject Wildcard & filters
Date Fri, 12 Oct 2007 17:42:20 GMT
I'm trying to over-ride QueryParser.getWildcardQuery to use filtering.

I'm missing something, because the following still gets the
maxBooleanClauses limit.

I guess the terms are still expanded even though the query is wrapped in
a filter. How do I avoid the term expansion altogether? Is there a
built-in way to do this?

protected Query getWildcardQuery(String field, String termStr)
	throws ParseException {
		
	Query wildcardQuery = new WildcardQuery(new Term(field,
termStr));

	QueryWrapperFilter queryWrapperFilter = new
QueryWrapperFilter(wildcardQuery);

	ConstantScoreQuery constantScoreQuery = new
ConstantScoreQuery(queryWrapperFilter);

	return constantScoreQuery;

}


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