org.apache.lucene.search

Class ConstantScoreQuery

public class ConstantScoreQuery extends Query

A query that wraps a filter and simply returns a constant score equal to the query boost for every document in the filter.

Version: $Id$

Author: yonik

Nested Class Summary
protected classConstantScoreQuery.ConstantScorer
protected classConstantScoreQuery.ConstantWeight
Field Summary
protected Filterfilter
Constructor Summary
ConstantScoreQuery(Filter filter)
Method Summary
protected WeightcreateWeight(Searcher searcher)
booleanequals(Object o)
Returns true if o is equal to this.
inthashCode()
Returns a hash code value for this object.
Queryrewrite(IndexReader reader)
StringtoString(String field)
Prints a user-readable version of this query.

Field Detail

filter

protected final Filter filter

Constructor Detail

ConstantScoreQuery

public ConstantScoreQuery(Filter filter)

Method Detail

createWeight

protected Weight createWeight(Searcher searcher)

equals

public boolean equals(Object o)
Returns true if o is equal to this.

hashCode

public int hashCode()
Returns a hash code value for this object.

rewrite

public Query rewrite(IndexReader reader)

toString

public String toString(String field)
Prints a user-readable version of this query.
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.