lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r801768 - /lucene/solr/trunk/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
Date Thu, 06 Aug 2009 18:47:17 GMT
Author: yonik
Date: Thu Aug  6 18:47:16 2009
New Revision: 801768

URL: http://svn.apache.org/viewvc?rev=801768&view=rev
Log:
SOLR-1344: MoreLikeThis handler can't handle numeric id

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/handler/MoreLikeThisHandler.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/MoreLikeThisHandler.java?rev=801768&r1=801767&r2=801768&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/handler/MoreLikeThisHandler.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/handler/MoreLikeThisHandler.java Thu Aug  6
18:47:16 2009
@@ -289,7 +289,7 @@
       BooleanQuery mltQuery = new BooleanQuery();
       mltQuery.add(mltquery, BooleanClause.Occur.MUST);
       mltQuery.add(
-          new TermQuery(new Term(uniqueKeyField.getName(), doc.get(uniqueKeyField.getName()))),

+          new TermQuery(new Term(uniqueKeyField.getName(), uniqueKeyField.getType().storedToIndexed(doc.getFieldable(uniqueKeyField.getName())))),

             BooleanClause.Occur.MUST_NOT);
       
       DocListAndSet results = new DocListAndSet();



Mime
View raw message