lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1057851 - in /lucene/pylucene/branches/branch_3x: ./ java/org/apache/pylucene/search/ java/org/apache/pylucene/store/ test/
Date Tue, 11 Jan 2011 20:30:26 GMT
Author: vajda
Date: Tue Jan 11 20:30:25 2011
New Revision: 1057851

URL: http://svn.apache.org/viewvc?rev=1057851&view=rev
Log:
caught up with Lucene 3.x changes

Removed:
    lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/search/PythonSimilarityDelegator.java
Modified:
    lucene/pylucene/branches/branch_3x/Makefile
    lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/search/PythonSimilarity.java
    lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/store/PythonDirectory.java
    lucene/pylucene/branches/branch_3x/test/test_Similarity.py

Modified: lucene/pylucene/branches/branch_3x/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/branch_3x/Makefile?rev=1057851&r1=1057850&r2=1057851&view=diff
==============================================================================
--- lucene/pylucene/branches/branch_3x/Makefile (original)
+++ lucene/pylucene/branches/branch_3x/Makefile Tue Jan 11 20:30:25 2011
@@ -65,6 +65,13 @@ LUCENE=lucene-java-$(LUCENE_VER)
 #JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64
 #NUM_FILES=3
 
+# Mac OS X 10.6 (MacPorts 1.8.0 64-bit Python 2.6, Java 1.6)
+PREFIX_PYTHON=/Users/vajda/apache/pylucene-3.x/_install
+ANT=ant
+PYTHON=$(PREFIX_PYTHON)/bin/python
+JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64
+NUM_FILES=3
+
 # Mac OS X 10.6 (64-bit and 32-bit Python 2.6 together, Java 1.6)
 #PREFIX_PYTHON=/usr
 #ANT=ant

Modified: lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/search/PythonSimilarity.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/search/PythonSimilarity.java?rev=1057851&r1=1057850&r2=1057851&view=diff
==============================================================================
--- lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/search/PythonSimilarity.java
(original)
+++ lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/search/PythonSimilarity.java
Tue Jan 11 20:30:25 2011
@@ -18,6 +18,7 @@ package org.apache.pylucene.search;
 import org.apache.lucene.search.Similarity;
 import org.apache.lucene.search.Searcher;
 import org.apache.lucene.search.Explanation.IDFExplanation;
+import org.apache.lucene.index.FieldInvertState;
 import org.apache.lucene.index.Term;
 import java.util.Collection;
 
@@ -67,13 +68,12 @@ public class PythonSimilarity extends Si
 
     public native float coord(int overlap, int maxOverlap);
     public native float idf(int docFreq, int numDocs);
-    public native float lengthNorm(String fieldName, int numTokens);
+    public native float computeNorm(String fieldName, FieldInvertState state);
     public native float queryNorm(float sumOfSquaredWeights);
     public native float sloppyFreq(int distance);
     public native float tf(float freq);
     public native float scorePayload(int docId, String fieldName,
                                      int start, int end, byte [] payload,
                                      int offset, int length);
-
     
 }

Modified: lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/store/PythonDirectory.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/store/PythonDirectory.java?rev=1057851&r1=1057850&r2=1057851&view=diff
==============================================================================
--- lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/store/PythonDirectory.java
(original)
+++ lucene/pylucene/branches/branch_3x/java/org/apache/pylucene/store/PythonDirectory.java
Tue Jan 11 20:30:25 2011
@@ -16,6 +16,7 @@
 package org.apache.pylucene.store;
 
 import java.io.IOException;
+import java.util.Collection;
 
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IndexInput;
@@ -48,6 +49,13 @@ public class PythonDirectory extends Dir
         pythonDecRef();
     }
 
+    public void sync(Collection<String> names)
+        throws IOException 
+    {
+        for (String name : names)
+            sync(name);
+    }
+
     public native void pythonDecRef();
 
     public native void close()

Modified: lucene/pylucene/branches/branch_3x/test/test_Similarity.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/branch_3x/test/test_Similarity.py?rev=1057851&r1=1057850&r2=1057851&view=diff
==============================================================================
--- lucene/pylucene/branches/branch_3x/test/test_Similarity.py (original)
+++ lucene/pylucene/branches/branch_3x/test/test_Similarity.py Tue Jan 11 20:30:25 2011
@@ -18,7 +18,7 @@ from lucene import *
 
 class SimpleSimilarity(PythonSimilarity):
 
-    def lengthNorm(self, field, numTerms):
+    def computeNorm(self, field, state):
         return 1.0
 
     def queryNorm(self, sumOfSquaredWeights):



Mime
View raw message