FileDocCategorySizeDatePackage
FilteredQueryBuilder.javaAPI DocApache Lucene 2.1.02309Wed Feb 14 10:46:20 GMT 2007org.apache.lucene.xmlparser.builders

FilteredQueryBuilder

public class FilteredQueryBuilder extends Object implements org.apache.lucene.xmlparser.QueryBuilder
author
maharwood

Fields Summary
private org.apache.lucene.xmlparser.FilterBuilder
filterFactory
private org.apache.lucene.xmlparser.QueryBuilder
queryFactory
Constructors Summary
public FilteredQueryBuilder(org.apache.lucene.xmlparser.FilterBuilder filterFactory, org.apache.lucene.xmlparser.QueryBuilder queryFactory)

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

	
 	    Element filterElement=DOMUtils.getChildByTagOrFail(e,"Filter");
 	    filterElement=DOMUtils.getFirstChildOrFail(filterElement);
 	    Filter f=filterFactory.getFilter(filterElement);
 
 	    Element queryElement=DOMUtils.getChildByTagOrFail(e,"Query");
 	    queryElement=DOMUtils.getFirstChildOrFail(queryElement);
 	    Query q=queryFactory.getQuery(queryElement);
 	    
 	    FilteredQuery fq = new FilteredQuery(q,f);
 	    fq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
 	    return fq;