FileDocCategorySizeDatePackage
ConstantScoreQueryBuilder.javaAPI DocApache Lucene 1.91000Mon Feb 27 11:12:20 GMT 2006org.apache.lucene.xmlparser.builders

ConstantScoreQueryBuilder

public class ConstantScoreQueryBuilder extends Object implements org.apache.lucene.xmlparser.QueryBuilder

Fields Summary
private org.apache.lucene.xmlparser.FilterBuilderFactory
filterFactory
Constructors Summary
public ConstantScoreQueryBuilder(org.apache.lucene.xmlparser.FilterBuilderFactory filterFactory)

		this.filterFactory=filterFactory;
	
Methods Summary
public org.apache.lucene.search.QuerygetQuery(org.w3c.dom.Element e)

		Element filterElem=DOMUtils.getFirstChildElement(e);
		if(filterElem==null)
		{
			throw new ParserException("ConstantScoreQuery missing child element with filter");
		}
		Query q=new ConstantScoreQuery(filterFactory.getFilter(filterElem));
		q.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
		return q;