lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r829020 - in /lucene/java/trunk: contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java src/java/org/apache/lucene/search/payloads/BoostingTermQuery.java
Date Fri, 23 Oct 2009 12:21:43 GMT
Author: uschindler
Date: Fri Oct 23 12:21:43 2009
New Revision: 829020

URL: http://svn.apache.org/viewvc?rev=829020&view=rev
Log:
LUCENE-1973: Remove deprecated BoostingTermQuery

Removed:
    lucene/java/trunk/src/java/org/apache/lucene/search/payloads/BoostingTermQuery.java
Modified:
    lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java

Modified: lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java?rev=829020&r1=829019&r2=829020&view=diff
==============================================================================
--- lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java
(original)
+++ lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java
Fri Oct 23 12:21:43 2009
@@ -3,7 +3,8 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.SpanTermQuery;
-import org.apache.lucene.search.payloads.BoostingTermQuery;
+import org.apache.lucene.search.payloads.PayloadTermQuery;
+import org.apache.lucene.search.payloads.AveragePayloadFunction;
 import org.apache.lucene.xmlparser.DOMUtils;
 import org.apache.lucene.xmlparser.ParserException;
 import org.w3c.dom.Element;
@@ -35,7 +36,7 @@
 	{
  		String fieldName=DOMUtils.getAttributeWithInheritanceOrFail(e,"fieldName");
  		String value=DOMUtils.getNonBlankTextOrFail(e);
-  		BoostingTermQuery btq = new BoostingTermQuery(new Term(fieldName,value));
+  		PayloadTermQuery btq = new PayloadTermQuery(new Term(fieldName,value), new AveragePayloadFunction());
 
   		btq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
 		return btq;



Mime
View raw message