lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r931296 - in /lucene/pylucene/trunk: ./ java/org/apache/pylucene/search/ jcc/jcc/ jcc/jcc/sources/ test/
Date Tue, 06 Apr 2010 19:51:29 GMT
Author: vajda
Date: Tue Apr  6 19:51:29 2010
New Revision: 931296

URL: http://svn.apache.org/viewvc?rev=931296&view=rev
Log:
adapted to latest changes in Lucene trunk

Modified:
    lucene/pylucene/trunk/Makefile
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonByteParser.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonDoubleParser.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFloatParser.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonIntParser.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonLongParser.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonShortParser.java
    lucene/pylucene/trunk/jcc/jcc/python.py
    lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp
    lucene/pylucene/trunk/jcc/jcc/sources/functions.h
    lucene/pylucene/trunk/test/test_Sort.py

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Tue Apr  6 19:51:29 2010
@@ -140,7 +140,6 @@ LUCENE_JAR=$(LUCENE)/build/lucene-core-$
 ANALYZERS_JAR=$(LUCENE)/build/contrib/analyzers/common/lucene-analyzers-$(LUCENE_VER).jar
 HIGHLIGHTER_JAR=$(LUCENE)/build/contrib/highlighter/lucene-highlighter-$(LUCENE_VER).jar
 MEMORY_JAR=$(LUCENE)/build/contrib/memory/lucene-memory-$(LUCENE_VER).jar
-REGEX_JAR=$(LUCENE)/build/contrib/regex/lucene-regex-$(LUCENE_VER).jar
 QUERIES_JAR=$(LUCENE)/build/contrib/queries/lucene-queries-$(LUCENE_VER).jar
 EXTENSIONS_JAR=build/jar/extensions.jar
 
@@ -173,9 +172,6 @@ $(LUCENE_JAR): $(LUCENE)
 $(ANALYZERS_JAR): $(LUCENE_JAR)
 	cd $(LUCENE)/contrib/analyzers/common; $(ANT) -Dversion=$(LUCENE_VER)
 
-$(REGEX_JAR): $(LUCENE_JAR)
-	cd $(LUCENE)/contrib/regex; $(ANT) -Dversion=$(LUCENE_VER)
-
 $(MEMORY_JAR): $(LUCENE_JAR)
 	cd $(LUCENE)/contrib/memory; $(ANT) -Dversion=$(LUCENE_VER)
 
@@ -189,7 +185,7 @@ $(EXTENSIONS_JAR): $(LUCENE_JAR)
 	$(ANT) -f extensions.xml -Dlucene.dir=$(LUCENE)
 
 JARS=$(LUCENE_JAR) $(ANALYZERS_JAR) \
-     $(REGEX_JAR) $(MEMORY_JAR) $(HIGHLIGHTER_JAR) $(QUERIES_JAR) \
+     $(MEMORY_JAR) $(HIGHLIGHTER_JAR) $(QUERIES_JAR) \
      $(EXTENSIONS_JAR)
 
 

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonByteParser.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonByteParser.java?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonByteParser.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonByteParser.java Tue Apr  6
19:51:29 2010
@@ -16,6 +16,7 @@
 package org.apache.pylucene.search;
 
 import org.apache.lucene.search.FieldCache;
+import org.apache.lucene.util.BytesRef;
 
 /**
  * @author Andi Vajda
@@ -45,5 +46,5 @@ public class PythonByteParser implements
     }
 
     public native void pythonDecRef();
-    public native byte parseByte(String string);
+    public native byte parseByte(BytesRef ref);
 }

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonDoubleParser.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonDoubleParser.java?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonDoubleParser.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonDoubleParser.java Tue Apr
 6 19:51:29 2010
@@ -16,6 +16,7 @@
 package org.apache.pylucene.search;
 
 import org.apache.lucene.search.FieldCache;
+import org.apache.lucene.util.BytesRef;
 
 /**
  * @author Andi Vajda
@@ -45,5 +46,5 @@ public class PythonDoubleParser implemen
     }
 
     public native void pythonDecRef();
-    public native double parseDouble(String string);
+    public native double parseDouble(BytesRef ref);
 }

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFloatParser.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFloatParser.java?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFloatParser.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFloatParser.java Tue Apr 
6 19:51:29 2010
@@ -16,6 +16,7 @@
 package org.apache.pylucene.search;
 
 import org.apache.lucene.search.FieldCache;
+import org.apache.lucene.util.BytesRef;
 
 /**
  * @author Andi Vajda
@@ -45,5 +46,5 @@ public class PythonFloatParser implement
     }
 
     public native void pythonDecRef();
-    public native float parseFloat(String string);
+    public native float parseFloat(BytesRef ref);
 }

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonIntParser.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonIntParser.java?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonIntParser.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonIntParser.java Tue Apr  6
19:51:29 2010
@@ -16,6 +16,7 @@
 package org.apache.pylucene.search;
 
 import org.apache.lucene.search.FieldCache;
+import org.apache.lucene.util.BytesRef;
 
 /**
  * @author Andi Vajda
@@ -45,5 +46,5 @@ public class PythonIntParser implements 
     }
 
     public native void pythonDecRef();
-    public native int parseInt(String string);
+    public native int parseInt(BytesRef ref);
 }

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonLongParser.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonLongParser.java?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonLongParser.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonLongParser.java Tue Apr  6
19:51:29 2010
@@ -16,6 +16,7 @@
 package org.apache.pylucene.search;
 
 import org.apache.lucene.search.FieldCache;
+import org.apache.lucene.util.BytesRef;
 
 /**
  * @author Andi Vajda
@@ -45,5 +46,5 @@ public class PythonLongParser implements
     }
 
     public native void pythonDecRef();
-    public native long parseLong(String string);
+    public native long parseLong(BytesRef ref);
 }

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonShortParser.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonShortParser.java?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonShortParser.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonShortParser.java Tue Apr 
6 19:51:29 2010
@@ -16,6 +16,7 @@
 package org.apache.pylucene.search;
 
 import org.apache.lucene.search.FieldCache;
+import org.apache.lucene.util.BytesRef;
 
 /**
  * @author Andi Vajda
@@ -45,5 +46,5 @@ public class PythonShortParser implement
     }
 
     public native void pythonDecRef();
-    public native short parseShort(String string);
+    public native short parseShort(BytesRef ref);
 }

Modified: lucene/pylucene/trunk/jcc/jcc/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/python.py?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/python.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/python.py Tue Apr  6 19:51:29 2010
@@ -54,7 +54,7 @@ CALLARGS = { 'boolean': ('O', '(%s ? Py_
 
 BOXED = set(('java.lang.Boolean',
              'java.lang.Byte',
-             'java.lang.Char',
+             'java.lang.Character',
              'java.lang.Double',
              'java.lang.Float',
              'java.lang.Integer',

Modified: lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp Tue Apr  6 19:51:29 2010
@@ -1345,7 +1345,7 @@ PyObject *unboxByte(const jobject &obj)
     Py_RETURN_NONE;
 }
 
-PyObject *unboxChar(const jobject &obj)
+PyObject *unboxCharacter(const jobject &obj)
 {
     if (obj != NULL)
     {

Modified: lucene/pylucene/trunk/jcc/jcc/sources/functions.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/functions.h?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/functions.h (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/functions.h Tue Apr  6 19:51:29 2010
@@ -74,7 +74,7 @@ PyObject *wrapType(PyTypeObject *type, c
 
 PyObject *unboxBoolean(const jobject& obj);
 PyObject *unboxByte(const jobject& obj);
-PyObject *unboxChar(const jobject& obj);
+PyObject *unboxCharacter(const jobject& obj);
 PyObject *unboxDouble(const jobject& obj);
 PyObject *unboxFloat(const jobject& obj);
 PyObject *unboxInteger(const jobject& obj);

Modified: lucene/pylucene/trunk/test/test_Sort.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Sort.py?rev=931296&r1=931295&r2=931296&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Sort.py (original)
+++ lucene/pylucene/trunk/test/test_Sort.py Tue Apr  6 19:51:29 2010
@@ -297,27 +297,27 @@ class SortTestCase(TestCase):
         
         class intParser(PythonIntParser):
             def parseInt(_self, val):
-                return (ord(val[0]) - ord('A')) * 123456
+                return (val.bytes[0] - ord('A')) * 123456
 
         class floatParser(PythonFloatParser):
             def parseFloat(_self, val):
-                return math.sqrt(ord(val[0]))
+                return math.sqrt(val.bytes[0])
 
         class longParser(PythonLongParser):
             def parseLong(_self, val):
-                return (ord(val[0]) - ord('A')) * 1234567890L
+                return (val.bytes[0] - ord('A')) * 1234567890L
 
         class doubleParser(PythonDoubleParser):
             def parseDouble(_self, val):
-                return math.pow(ord(val[0]), ord(val[0]) - ord('A'))
+                return math.pow(val.bytes[0], val.bytes[0] - ord('A'))
 
         class byteParser(PythonByteParser):
             def parseByte(_self, val):
-                return chr(ord(val[0]) - ord('A'))
+                return chr(val.bytes[0] - ord('A'))
 
         class shortParser(PythonShortParser):
             def parseShort(_self, val):
-                return ord(val[0]) - ord('A')
+                return val.bytes[0] - ord('A')
 
         sort = Sort()
         sort.setSort([SortField("parser", intParser()),
@@ -1003,7 +1003,7 @@ class MyFieldComparator(PythonFieldCompa
         
         class intParser(PythonIntParser):
             def parseInt(_self, val):
-                return (ord(val[0]) - ord('A')) * 123456
+                return (val.bytes[0] - ord('A')) * 123456
                 
         self.docValues = FieldCache.DEFAULT.getInts(reader, "parser",
                                                     intParser())



Mime
View raw message