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

SpanTermBuilder

public class SpanTermBuilder extends SpanBuilderBase

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

		String fieldName=DOMUtils.getAttributeWithInheritance(e,"fieldName");
		String value=DOMUtils.getText(e);
		if((fieldName==null)||(fieldName.length()==0))
		{
			throw new ParserException("SpanTermQuery missing fieldName property ");
		}
		if((value==null)||(value.length()==0))
		{
			throw new ParserException("TermQuery missing value property ");
		}
		SpanTermQuery stq = new SpanTermQuery(new Term(fieldName,value));
		
		stq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
		return stq;