Package org.apache.lucene.search.payloads

Examples of org.apache.lucene.search.payloads.AveragePayloadFunction


  public SpanQuery getSpanQuery(Element e) throws ParserException
  {
     String fieldName=DOMUtils.getAttributeWithInheritanceOrFail(e,"fieldName");
     String value=DOMUtils.getNonBlankTextOrFail(e);
      PayloadTermQuery btq = new PayloadTermQuery(new Term(fieldName,value), new AveragePayloadFunction());

      btq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
    return btq;

  }
View Full Code Here


  @Override
  public SpanQuery getSpanQuery(Element e) throws ParserException {
    String fieldName = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName");
    String value = DOMUtils.getNonBlankTextOrFail(e);

    PayloadTermQuery btq = new PayloadTermQuery(new Term(fieldName, value), new AveragePayloadFunction());
    btq.setBoost(DOMUtils.getAttribute(e, "boost", 1.0f));
    return btq;
  }
View Full Code Here

          }
         
          // Now, add this topic to the list, if the score is nonzero
          if (score > 0.01f){
            //System.out.printf("Adding topic %d with score %f\n", k, score);
            PayloadTermQuery fsq1 = new PayloadTermQuery(new Term("topicspayload"+lda.scens.get(idx).K, "p"+k), new AveragePayloadFunction(), false);
            bquery.add(fsq1, Occur.SHOULD);           
            queryOpt[k] = score;
          }
        }
       
View Full Code Here

  public SpanQuery getSpanQuery(Element e) throws ParserException
  {
     String fieldName=DOMUtils.getAttributeWithInheritanceOrFail(e,"fieldName");
     String value=DOMUtils.getNonBlankTextOrFail(e);
      PayloadTermQuery btq = new PayloadTermQuery(new Term(fieldName,value), new AveragePayloadFunction());

      btq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
    return btq;

  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.payloads.AveragePayloadFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.