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

SpanFirstBuilder

public class SpanFirstBuilder extends SpanBuilderBase

Fields Summary
SpanQueryBuilder
factory
Constructors Summary
public SpanFirstBuilder(SpanQueryBuilder factory)

        super();
        this.factory = factory;
    
Methods Summary
public org.apache.lucene.search.spans.SpanQuerygetSpanQuery(org.w3c.dom.Element e)

	    int end=DOMUtils.getAttribute(e,"end",1);
	    Element child=DOMUtils.getFirstChildElement(e);
	    SpanQuery q=factory.getSpanQuery(child);
	    
		SpanFirstQuery sfq = new SpanFirstQuery(q,end);
		
		sfq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
		return sfq;