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

TermQueryBuilder

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

Fields Summary
Constructors Summary
Methods Summary
public org.apache.lucene.search.QuerygetQuery(org.w3c.dom.Element e)

		
        String field=DOMUtils.getAttributeWithInheritanceOrFail(e,"fieldName");
 		String value=DOMUtils.getNonBlankTextOrFail(e);
  		TermQuery tq = new TermQuery(new Term(field,value));
  		tq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));

  		return tq;