<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>commits@lucene.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/lucene-commits/"/>
<id>http://mail-archives.apache.org/mod_mbox/lucene-commits/</id>
<updated>2009-12-05T15:27:09Z</updated>
<entry>
<title>svn commit: r887100 - /lucene/board-reports/2009/board-report-dec-2009.txt</title>
<author><name>ab@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200912.mbox/%3c20091204082016.02E1423888FD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091204082016-02E1423888FD@eris-apache-org%3e</id>
<updated>2009-12-04T08:20:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ab
Date: Fri Dec  4 08:20:06 2009
New Revision: 887100

URL: http://svn.apache.org/viewvc?rev=887100&amp;view=rev
Log:
Some additions to the Nutch status report.

Modified:
    lucene/board-reports/2009/board-report-dec-2009.txt

Modified: lucene/board-reports/2009/board-report-dec-2009.txt
URL: http://svn.apache.org/viewvc/lucene/board-reports/2009/board-report-dec-2009.txt?rev=887100&amp;r1=887099&amp;r2=887100&amp;view=diff
==============================================================================
--- lucene/board-reports/2009/board-report-dec-2009.txt (original)
+++ lucene/board-reports/2009/board-report-dec-2009.txt Fri Dec  4 08:20:06 2009
@@ -24,11 +24,11 @@
 
 Nutch is a web-search engine: crawler, indexer and search runtime. There has
 been a recent flurry of work on discussing Nutch's future post ApacheCon, 
-spearheaded by Andrzej Bialecki and others. In addition, there have been 
-efforts to more closely integrate Tika's parsing framework into Nutch,
-as well as efforts to update the (existing) mime detection work based on improvements
-to Tika's mime detector.
-
+spearheaded by Andrzej Bialecki and others. In addition, there is ongoing
+work on reducing code duplication (tighter integration of the Tika parsing
+framework and mime type detection, better Solr integration) and using a
+more flexible storage system (e.g. HBase). Many issues are being fixed in
+preparation for a 1.1 release early next quarter.
 
   
 LUCY




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r886845 - /lucene/board-reports/2009/board-report-dec-2009.txt</title>
<author><name>marvin@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200912.mbox/%3c20091203164937.B07C5238898A@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091203164937-B07C5238898A@eris-apache-org%3e</id>
<updated>2009-12-03T16:49:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: marvin
Date: Thu Dec  3 16:49:28 2009
New Revision: 886845

URL: http://svn.apache.org/viewvc?rev=886845&amp;view=rev
Log:
Add Dec 2009 board report entry for Lucy.

Modified:
    lucene/board-reports/2009/board-report-dec-2009.txt

Modified: lucene/board-reports/2009/board-report-dec-2009.txt
URL: http://svn.apache.org/viewvc/lucene/board-reports/2009/board-report-dec-2009.txt?rev=886845&amp;r1=886844&amp;r2=886845&amp;view=diff
==============================================================================
--- lucene/board-reports/2009/board-report-dec-2009.txt (original)
+++ lucene/board-reports/2009/board-report-dec-2009.txt Thu Dec  3 16:49:28 2009
@@ -34,6 +34,8 @@
 LUCY
 
 Lucy is a loose C port of Lucene targeted at dynamic language bindings.
+Development this quarter has focused on abstraction of the IO subsystem and
+portability to various compiler platforms.
 
 
 




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r886813 - /lucene/board-reports/2009/board-report-dec-2009.txt</title>
<author><name>mattmann@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200912.mbox/%3c20091203152226.3D8042388996@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091203152226-3D8042388996@eris-apache-org%3e</id>
<updated>2009-12-03T15:22:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: mattmann
Date: Thu Dec  3 15:22:24 2009
New Revision: 886813

URL: http://svn.apache.org/viewvc?rev=886813&amp;view=rev
Log:
Update December board report with more info on Nutch and Tika.

Modified:
    lucene/board-reports/2009/board-report-dec-2009.txt

Modified: lucene/board-reports/2009/board-report-dec-2009.txt
URL: http://svn.apache.org/viewvc/lucene/board-reports/2009/board-report-dec-2009.txt?rev=886813&amp;r1=886812&amp;r2=886813&amp;view=diff
==============================================================================
--- lucene/board-reports/2009/board-report-dec-2009.txt (original)
+++ lucene/board-reports/2009/board-report-dec-2009.txt Thu Dec  3 15:22:24 2009
@@ -22,7 +22,12 @@
 
 NUTCH
 
-Nutch is a web-search engine: crawler, indexer and search runtime.
+Nutch is a web-search engine: crawler, indexer and search runtime. There has
+been a recent flurry of work on discussing Nutch's future post ApacheCon, 
+spearheaded by Andrzej Bialecki and others. In addition, there have been 
+efforts to more closely integrate Tika's parsing framework into Nutch,
+as well as efforts to update the (existing) mime detection work based on improvements
+to Tika's mime detector.
 
 
   
@@ -59,6 +64,10 @@
 
 Apache Tika is a toolkit for detecting and extracting metadata and
 structured text content from various documents using existing parser
-libraries.  Tika released version 0.5 this quarter.
+libraries.  Tika released version 0.5 this quarter. There have been
+recent development efforts to speed up Tika's mime detector, as well as
+efforts to provide a self-contained OGSI-based Tika bundle. There is a 
+strong desire to release these post 0.5 improvements, so we are planning
+to release Tika 0.6 in the next few weeks.
 
 




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r886271 - /lucene/board-reports/2009/board-report-dec-2009.txt</title>
<author><name>gsingers@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200912.mbox/%3c20091202191537.3A323238888E@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091202191537-3A323238888E@eris-apache-org%3e</id>
<updated>2009-12-02T19:15:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: gsingers
Date: Wed Dec  2 19:15:36 2009
New Revision: 886271

URL: http://svn.apache.org/viewvc?rev=886271&amp;view=rev
Log:
draft board report

Added:
    lucene/board-reports/2009/board-report-dec-2009.txt

Added: lucene/board-reports/2009/board-report-dec-2009.txt
URL: http://svn.apache.org/viewvc/lucene/board-reports/2009/board-report-dec-2009.txt?rev=886271&amp;view=auto
==============================================================================
--- lucene/board-reports/2009/board-report-dec-2009.txt (added)
+++ lucene/board-reports/2009/board-report-dec-2009.txt Wed Dec  2 19:15:36 2009
@@ -0,0 +1,64 @@
+
+=== Lucene Status Report: Sept, 2009 ===
+
+TLP
+
+-The PMC added George Aroush and Chris Mattmann to the PMC
+-The PMC added Open Relevance committer Robert Muir
+
+
+
+LUCENE JAVA
+
+Lucene Java is a search-engine toolkit.  Development has been
+active and we released both 2.9 and 3.0 this quarter
+
+SOLR
+
+Solr is a full text search server using Lucene Java.  
+Development and the community is active.  Solr released
+version 1.4 this quarter.
+
+
+NUTCH
+
+Nutch is a web-search engine: crawler, indexer and search runtime.
+
+
+  
+LUCY
+
+Lucy is a loose C port of Lucene targeted at dynamic language bindings.
+
+
+
+LUCENE.NET 
+
+Lucene.NET is a .NET based port of Lucene Java.  Development and the
+community are active.  Lucene.NET graduated from the incubator and is 
+now a full-fledged Lucene sub-project.
+
+
+Mahout
+
+Apache Mahout is working towards
+building a suite of scalable machine learning libraries for text and
+data mining.  Development is active and version 0.2 was released this
+quarter.
+
+Open Relevance Project
+
+
+
+PyLucene
+
+PyLucene is a Python integration of Lucene Java.  Development is
+active.  
+
+TIKA
+
+Apache Tika is a toolkit for detecting and extracting metadata and
+structured text content from various documents using existing parser
+libraries.  Tika released version 0.5 this quarter.
+
+




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r885299 - /lucene/pylucene/trunk/jcc/jcc/__main__.py</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091129234405.E83BC2388962@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091129234405-E83BC2388962@eris-apache-org%3e</id>
<updated>2009-11-29T23:44:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Sun Nov 29 23:44:05 2009
New Revision: 885299

URL: http://svn.apache.org/viewvc?rev=885299&amp;view=rev
Log:
added command line help for --no-generics

Modified:
    lucene/pylucene/trunk/jcc/jcc/__main__.py

Modified: lucene/pylucene/trunk/jcc/jcc/__main__.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/__main__.py?rev=885299&amp;r1=885298&amp;r2=885299&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/__main__.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/__main__.py Sun Nov 29 23:44:05 2009
@@ -37,16 +37,16 @@
                               multiple JCC-wrapped modules can be used within
                               the same Python runtime
     --sequence CLASS METHODSIGNATURE
-                            - Generate a pythonic sequence protocol wrapper for
+                            - generate a pythonic sequence protocol wrapper for
                               CLASS
     --mapping CLASS METHODSIGNATURE1 METHODSIGNATURE2
-                            - Generate a pythonic map protocol wrapper for CLASS
-
+                            - generate a pythonic map protocol wrapper for CLASS
     --rename CLASS1=NAME1,CLASS2=NAME2,...
-                            - Rename one or more Python wrapper classes to
+                            - rename one or more Python wrapper classes to
                               avoid name clashes due to the flattening of
                               the Java package namespaces as mapped into
                               Python
+    --no-generics           - disable support for Java generics
 
     If you're planning to use pythonic wrappers you should read the relevant
     documentation first:




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r885293 - /lucene/pylucene/trunk/Makefile</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091129232332.5136423888C5@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091129232332-5136423888C5@eris-apache-org%3e</id>
<updated>2009-11-29T23:23:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Sun Nov 29 23:23:31 2009
New Revision: 885293

URL: http://svn.apache.org/viewvc?rev=885293&amp;view=rev
Log:
realclean to do more

Modified:
    lucene/pylucene/trunk/Makefile

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=885293&amp;r1=885292&amp;r2=885293&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Sun Nov 29 23:23:31 2009
@@ -235,8 +235,8 @@
 	if test -f $(LUCENE)/build.xml; then cd $(LUCENE); $(ANT) clean; fi
 	rm -rf build
 
-realclean: clean
-	rm -rf $(LUCENE)
+realclean:
+	rm -rf $(LUCENE) build samples/LuceneInAction/index
 
 
 BUILD_TEST:=$(PYLUCENE)/build/test




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r885289 - /lucene/pylucene/trunk/Makefile</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091129231135.2DE1523889DE@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091129231135-2DE1523889DE@eris-apache-org%3e</id>
<updated>2009-11-29T23:11:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Sun Nov 29 23:11:34 2009
New Revision: 885289

URL: http://svn.apache.org/viewvc?rev=885289&amp;view=rev
Log:
set PYTHONPATH for samples too

Modified:
    lucene/pylucene/trunk/Makefile

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=885289&amp;r1=885288&amp;r2=885289&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Sun Nov 29 23:11:34 2009
@@ -255,12 +255,12 @@
 test: install-test samples/LuceneInAction/index
 	find test -name 'test_*.py' | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
 	ls samples/LuceneInAction/*Test.py | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
-	$(PYTHON) samples/LuceneInAction/AnalyzerDemo.py
-	$(PYTHON) samples/LuceneInAction/AnalyzerUtils.py
-	$(PYTHON) samples/LuceneInAction/BooksLikeThis.py
-	$(PYTHON) samples/LuceneInAction/Explainer.py samples/LuceneInAction/index programming
-	$(PYTHON) samples/LuceneInAction/HighlightIt.py
-	$(PYTHON) samples/LuceneInAction/SortingExample.py
+	PYTHONPATH=$(BUILD_TEST) $(PYTHON) samples/LuceneInAction/AnalyzerDemo.py
+	PYTHONPATH=$(BUILD_TEST) $(PYTHON) samples/LuceneInAction/AnalyzerUtils.py
+	PYTHONPATH=$(BUILD_TEST) $(PYTHON) samples/LuceneInAction/BooksLikeThis.py
+	PYTHONPATH=$(BUILD_TEST) $(PYTHON) samples/LuceneInAction/Explainer.py samples/LuceneInAction/index
programming
+	PYTHONPATH=$(BUILD_TEST) $(PYTHON) samples/LuceneInAction/HighlightIt.py
+	PYTHONPATH=$(BUILD_TEST) $(PYTHON) samples/LuceneInAction/SortingExample.py
 
 
 ARCHIVE=pylucene-$(VERSION)-src.tar.gz




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r885285 - in /lucene/pylucene/trunk/jcc/jcc/sources: functions.cpp functions.h</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091129224850.75CCD23888D1@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091129224850-75CCD23888D1@eris-apache-org%3e</id>
<updated>2009-11-29T22:48:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Sun Nov 29 22:48:49 2009
New Revision: 885285

URL: http://svn.apache.org/viewvc?rev=885285&amp;view=rev
Log:
workaround va_arg() limitations

Modified:
    lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp
    lucene/pylucene/trunk/jcc/jcc/sources/functions.h

Modified: lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp?rev=885285&amp;r1=885284&amp;r2=885285&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp Sun Nov 29 22:48:49 2009
@@ -550,7 +550,7 @@
                   {
                       PyTypeObject ***tp = va_arg(list, PyTypeObject ***);
 
-                      va_arg(list, PyTypeObject **(*)(void *));
+                      va_arg(list, getparametersfn);
                       *tp = NULL;
                   }
 #endif
@@ -576,7 +576,7 @@
                   {
                       PyTypeObject ***tp = va_arg(list, PyTypeObject ***);
                       PyTypeObject **(*parameters_)(void *) = 
-                          va_arg(list, PyTypeObject **(*)(void *));
+                          va_arg(list, getparametersfn);
 
                       if (arg == Py_None)
                           *tp = 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=885285&amp;r1=885284&amp;r2=885285&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/functions.h (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/functions.h Sun Nov 29 22:48:49 2009
@@ -31,6 +31,7 @@
 #endif
 
 typedef jclass (*getclassfn)(void);
+typedef PyTypeObject **(*getparametersfn)(void *);
 
 PyObject *PyErr_SetArgsError(char *name, PyObject *args);
 PyObject *PyErr_SetArgsError(PyObject *self, char *name, PyObject *args);




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r884702 - in /lucene/pylucene/trunk: ./ jcc/ samples/LuceneInAction/lia/advsearching/ samples/LuceneInAction/lia/handlingtypes/framework/ samples/LuceneInAction/lia/handlingtypes/html/ samples/LuceneInAction/lia/handlingtypes/msdoc/ samples...</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091126214348.048AC23888C2@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091126214348-048AC23888C2@eris-apache-org%3e</id>
<updated>2009-11-26T21:43:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Thu Nov 26 21:43:46 2009
New Revision: 884702

URL: http://svn.apache.org/viewvc?rev=884702&amp;view=rev
Log:
preparing 3.0.0 release

Modified:
    lucene/pylucene/trunk/CHANGES
    lucene/pylucene/trunk/Makefile
    lucene/pylucene/trunk/jcc/CHANGES
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/framework/FileIndexer.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/html/HTMLHandler.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/msdoc/AntiWordHandler.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/pdf/PDFHandler.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/text/PlainTextHandler.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/xml/DigesterXMLHandler.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbIndexer.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbSearcher.py

Modified: lucene/pylucene/trunk/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/CHANGES?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/CHANGES (original)
+++ lucene/pylucene/trunk/CHANGES Thu Nov 26 21:43:46 2009
@@ -3,10 +3,10 @@
 ----------------------
  - unit tests ported to new API
  - removed InstantiatedIndex contrib from default build
- - with (partial) JCC Java generics support, a lot less downcasting is needed
+ - with JCC 2.5's Java generics support, a lot less downcasting needed
  - Java Lucene sources now included in PyLucene source distribution
- - "Lucene in Action" samples converted to new Lucene 3.0 API
- - 
+ - "Lucene in Action" samples and tests converted to new Lucene 3.0 API
+ - PyLucene built with JCC 2.5
 
 Version 2.4.1 -&gt; 2.9.0
 ----------------------

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Thu Nov 26 21:43:46 2009
@@ -14,10 +14,10 @@
 # site-packages directory.
 #
 
-VERSION=3.0.0-0
-LUCENE_SVN_VER=883080
+VERSION=3.0.0-1
+LUCENE_SVN_VER=HEAD
 LUCENE_VER=3.0.0
-LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/branches/lucene_3_0
+LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/tags/lucene_3_0_0
 PYLUCENE:=$(shell pwd)
 LUCENE=lucene-java-$(LUCENE_VER)
 

Modified: lucene/pylucene/trunk/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/CHANGES?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/CHANGES (original)
+++ lucene/pylucene/trunk/jcc/CHANGES Thu Nov 26 21:43:46 2009
@@ -4,14 +4,13 @@
  - added env.jni_version for the JNI version as returned by JNI's GetVersion()
  - added env.java_version for java.lang.System.getProperty('java.version')
  - default value to initVM's classpath parameter now is importing module's
- - added (partial) support for Java generics
+ - added support for Java generics
  - added 'string_' property to JArray('byte') instances to extract byte string
  - fixed bug with passing list of extension objects
  - reworked iterator and enumeration 'next' templates to shortcut C++ wrappers
  - fixed bug in code comparing setuptools versions when &gt;= 0.6c10
  - verified build against setuptools from distribute 0.6.6
  - renamed patch.43 to differentiate setuptools versions
- - 
 
 Version 2.3 -&gt; 2.4
 ------------------

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py Thu Nov
26 21:43:46 2009
@@ -76,12 +76,13 @@
         directory = SimpleFSDirectory(File(indexDir))
 
         example = SortingExample(directory)
+
         example.displayResults(query, Sort.RELEVANCE)
         example.displayResults(query, Sort.INDEXORDER)
-        example.displayResults(query, Sort(SortField("category",
-                                                     SortField.STRING)))
-        example.displayResults(query, Sort(SortField("pubmonth",
-                                                     SortField.INT, True)))
+        example.displayResults(query,
+                               Sort(SortField("category", SortField.STRING)))
+        example.displayResults(query,
+                               Sort(SortField("pubmonth", SortField.INT, True)))
 
         example.displayResults(query,
                                Sort([SortField("category", SortField.STRING),

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/framework/FileIndexer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/framework/FileIndexer.py?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/framework/FileIndexer.py
(original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/framework/FileIndexer.py
Thu Nov 26 21:43:46 2009
@@ -63,7 +63,8 @@
         if not (os.path.exists(dataDir) and os.path.isdir(dataDir)):
             raise IOError, "%s does not exist or is not a directory" %(dataDir)
 
-        writer = IndexWriter(indexDir, StandardAnalyzer(), True)
+        writer = IndexWriter(indexDir, StandardAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
         writer.setUseCompoundFile(False)
 
         numIndexed = cls.indexDirectory(writer, dataDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/html/HTMLHandler.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/html/HTMLHandler.py?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/html/HTMLHandler.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/html/HTMLHandler.py Thu
Nov 26 21:43:46 2009
@@ -32,7 +32,7 @@
             doc = Document()
             doc.add(Field("contents", StringReader(string)))
             doc.add(Field("filename", os.path.abspath(path),
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             writer.addDocument(doc)
 
             return doc

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/msdoc/AntiWordHandler.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/msdoc/AntiWordHandler.py?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/msdoc/AntiWordHandler.py
(original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/msdoc/AntiWordHandler.py
Thu Nov 26 21:43:46 2009
@@ -32,7 +32,7 @@
         else:
             doc.add(Field("contents", StringReader(string)))
             doc.add(Field("filename", os.path.abspath(path),
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             writer.addDocument(doc)
 
             exitCode = process.wait()

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/pdf/PDFHandler.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/pdf/PDFHandler.py?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/pdf/PDFHandler.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/pdf/PDFHandler.py Thu Nov
26 21:43:46 2009
@@ -35,7 +35,7 @@
                     break
                 name, value = line.split(':', 1)
                 doc.add(Field(name.strip(), value.strip(),
-                              Field.Store.YES, Field.Index.UN_TOKENIZED))
+                              Field.Store.YES, Field.Index.NOT_ANALYZED))
 
             exitCode = process.wait()
             if exitCode != 0:
@@ -49,7 +49,7 @@
         else:
             doc.add(Field("contents", StringReader(string)))
             doc.add(Field("filename", os.path.abspath(path),
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             writer.addDocument(doc)
 
             exitCode = process.wait()

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/text/PlainTextHandler.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/text/PlainTextHandler.py?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/text/PlainTextHandler.py
(original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/text/PlainTextHandler.py
Thu Nov 26 21:43:46 2009
@@ -30,7 +30,7 @@
             doc = Document()
             doc.add(Field("contents", reader))
             doc.add(Field("filename", os.path.abspath(path),
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             writer.addDocument(doc)
             reader.close()
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/xml/DigesterXMLHandler.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/xml/DigesterXMLHandler.py?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/xml/DigesterXMLHandler.py
(original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/handlingtypes/xml/DigesterXMLHandler.py
Thu Nov 26 21:43:46 2009
@@ -43,23 +43,23 @@
             props = self.digester.parse(file)
             doc = Document()
             doc.add(Field("type", props['type'],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("name", props['name'],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("address", props['address'],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("city", props['city'],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("province", props['province'],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("postalcode", props['postalcode'],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("country", props['country'],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("telephone", props['telephone'],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("filename", os.path.abspath(path),
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             writer.addDocument(doc)
             file.close()
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbIndexer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbIndexer.py?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbIndexer.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbIndexer.py Thu Nov 26
21:43:46 2009
@@ -77,12 +77,13 @@
         try:
             txn = env.txn_begin(None)
             directory = DbDirectory(txn, index, blocks, 0)
-            writer = IndexWriter(directory, StandardAnalyzer(), create)
+            writer = IndexWriter(directory, StandardAnalyzer(), create,
+                                 IndexWriter.MaxFieldLength.UNLIMITED)
             writer.setUseCompoundFile(False)
 
             doc = Document()
             doc.add(Field("contents", "The quick brown fox...",
-                          Field.Store.YES, Field.Index.TOKENIZED))
+                          Field.Store.YES, Field.Index.ANALYZED))
             writer.addDocument(doc)
 
             writer.optimize()

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbSearcher.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbSearcher.py?rev=884702&amp;r1=884701&amp;r2=884702&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbSearcher.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/BerkeleyDbSearcher.py Thu Nov 26
21:43:46 2009
@@ -68,10 +68,10 @@
         try:
             txn = env.txn_begin(None)
             directory = DbDirectory(txn, index, blocks, 0)
-            searcher = IndexSearcher(directory)
+            searcher = IndexSearcher(directory, True)
 
-            hits = searcher.search(TermQuery(Term("contents", "fox")))
-            print len(hits), "document(s) found"
+            topDocs = searcher.search(TermQuery(Term("contents", "fox")), 50)
+            print topDocs.totalHits, "document(s) found"
             searcher.close()
         except:
             if txn is not None:




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r884442 - in /lucene/site: publish/ publish/skin/ publish/skin/images/ src/documentation/content/xdocs/</title>
<author><name>uschindler@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091126075215.4F70E23889E8@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091126075215-4F70E23889E8@eris-apache-org%3e</id>
<updated>2009-11-26T07:52:14Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: uschindler
Date: Thu Nov 26 07:52:14 2009
New Revision: 884442

URL: http://svn.apache.org/viewvc?rev=884442&amp;view=rev
Log:
Commit changes for Lucene Java 3.0.0 in Lucene top level page

Modified:
    lucene/site/publish/index.html
    lucene/site/publish/index.pdf
    lucene/site/publish/skin/basic.css
    lucene/site/publish/skin/images/rc-b-l-15-1body-2menu-3menu.png
    lucene/site/publish/skin/images/rc-b-r-15-1body-2menu-3menu.png
    lucene/site/publish/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
    lucene/site/publish/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
    lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
    lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
    lucene/site/publish/skin/images/rc-t-r-15-1body-2menu-3menu.png
    lucene/site/publish/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
    lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
    lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
    lucene/site/publish/skin/print.css
    lucene/site/publish/skin/profile.css
    lucene/site/publish/skin/screen.css
    lucene/site/src/documentation/content/xdocs/index.xml

Modified: lucene/site/publish/index.html
URL: http://svn.apache.org/viewvc/lucene/site/publish/index.html?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
--- lucene/site/publish/index.html (original)
+++ lucene/site/publish/index.html Thu Nov 26 07:52:14 2009
@@ -214,7 +214,10 @@
 &lt;a href="#News"&gt;News&lt;/a&gt;
 &lt;ul class="minitoc"&gt;
 &lt;li&gt;
-&lt;a href="#17+Nov.+2009+-+Apache+Mahout+0.2+released"&gt;17 Nov. 2009 - Apache Mahout 0.2
released&lt;/a&gt;
+&lt;a href="#25+November+2009+-+Lucene+Java+3.0.0+available"&gt;25 November 2009 - Lucene
Java 3.0.0 available&lt;/a&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;a href="#17+November+2009+-+Apache+Mahout+0.2+released"&gt;17 November 2009 - Apache
Mahout 0.2 released&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
 &lt;a href="#10+November+2009+-+Solr+1.4+Released"&gt;10 November 2009 - Solr 1.4 Released&lt;/a&gt;
@@ -325,8 +328,68 @@
 &lt;a name="N10076"&gt;&lt;/a&gt;&lt;a name="News"&gt;&lt;/a&gt;
 &lt;h2 class="h3"&gt;News&lt;/h2&gt;
 &lt;div class="section"&gt;
-&lt;a name="N1007C"&gt;&lt;/a&gt;&lt;a name="17+Nov.+2009+-+Apache+Mahout+0.2+released"&gt;&lt;/a&gt;
-&lt;h3 class="h4"&gt;17 Nov. 2009 - Apache Mahout 0.2 released&lt;/h3&gt;
+&lt;a name="N1007C"&gt;&lt;/a&gt;&lt;a name="25+November+2009+-+Lucene+Java+3.0.0+available"&gt;&lt;/a&gt;
+&lt;h3 class="h4"&gt;25 November 2009 - Lucene Java 3.0.0 available&lt;/h3&gt;
+&lt;p&gt;
+          The new version is mostly a cleanup release without any new features. All
+          deprecations targeted to be removed in version 3.0 were removed. If you are
+          upgrading from version 2.9.1 of Lucene, you have to fix all deprecation
+          warnings in your code base to be able to recompile against this version.
+        &lt;/p&gt;
+&lt;p&gt;
+          This is the first Lucene release with Java 5 as a minimum requirement. The
+          API was cleaned up to make use of Java 5's generics, varargs, enums, and
+          autoboxing. New users of Lucene are advised to use this version for new
+          developments, because it has a clean, type safe new API. Upgrading users can
+          now remove unnecessary casts and add generics to their code, too. If you
+          have not upgraded your installation to Java 5, please read the file
+          &lt;span class="codefrag"&gt;JRE_VERSION_MIGRATION.txt&lt;/span&gt; &lt;em&gt;(please
note that this is not related to Lucene
+          3.0, it will also happen with any previous release when you upgrade your
+          Java environment)&lt;/em&gt;.
+        &lt;/p&gt;
+&lt;p&gt;
+          Lucene 3.0 has some changes regarding compressed fields: 2.9 already
+          deprecated compressed fields; support for them was removed now. Lucene 3.0
+          is still able to read indexes with compressed fields, but as soon as merges
+          occur or the index is optimized, all compressed fields are decompressed and
+          converted to &lt;span class="codefrag"&gt;Field.Store.YES&lt;/span&gt;. Because
of this, indexes with compressed
+          fields can suddenly get larger.
+        &lt;/p&gt;
+&lt;p&gt;
+          While we generally try and maintain full backwards compatibility between
+          major versions, Lucene 3.0 has some minor breaks, mostly related to
+          deprecation removal, pointed out in the 'Changes in backwards compatibility
+          policy' section of &lt;a href="http://lucene.apache.org/java/3_0_0/changes/Changes.html"&gt;CHANGES.txt&lt;/a&gt;.
+          Notable are:
+        &lt;/p&gt;
+&lt;ul&gt;
+          
+&lt;li&gt;
+&lt;span class="codefrag"&gt;IndexReader.open(Directory)&lt;/span&gt; now opens in read-only
mode per default
+          (this method was deprecated because of that in 2.9). The same occurs to
+          &lt;span class="codefrag"&gt;IndexSearcher&lt;/span&gt;.&lt;/li&gt;
+          
+&lt;li&gt;Already started in 2.9, core &lt;span class="codefrag"&gt;TokenStream&lt;/span&gt;s
are now made
+          final to enforce the decorator pattern.&lt;/li&gt;
+          
+&lt;li&gt;If you interrupt an &lt;span class="codefrag"&gt;IndexWriter&lt;/span&gt; merge
thread,
+          &lt;span class="codefrag"&gt;IndexWriter&lt;/span&gt; now throws an unchecked
+          &lt;span class="codefrag"&gt;ThreadInterruptedException&lt;/span&gt; that extends
&lt;span class="codefrag"&gt;RuntimeException&lt;/span&gt; and
+          clears the interrupt status.&lt;/li&gt;
+	      
+&lt;/ul&gt;
+&lt;p&gt;
+	        See &lt;a href="http://lucene.apache.org/java/3_0_0/changes/Changes.html"&gt;CHANGES&lt;/a&gt;
for details.
+        &lt;/p&gt;
+&lt;p&gt;
+	        
+&lt;strong&gt;Binary and source distributions are available
+	        &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/java/"&gt;here&lt;/a&gt;.&lt;/strong&gt;
+          Maven artifacts are available 
+	        &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
+	      &lt;/p&gt;
+&lt;a name="N100CC"&gt;&lt;/a&gt;&lt;a name="17+November+2009+-+Apache+Mahout+0.2+released"&gt;&lt;/a&gt;
+&lt;h3 class="h4"&gt;17 November 2009 - Apache Mahout 0.2 released&lt;/h3&gt;
 &lt;p&gt;The Apache Lucene project is pleased to announce the release of Apache Mahout 0.2.&lt;/p&gt;
 &lt;p&gt;
           Highlights include:
@@ -353,7 +416,7 @@
           &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/mahout/"&gt;Apache Mirrors&lt;/a&gt;
         
 &lt;/p&gt;
-&lt;a name="N100AC"&gt;&lt;/a&gt;&lt;a name="10+November+2009+-+Solr+1.4+Released"&gt;&lt;/a&gt;
+&lt;a name="N100FC"&gt;&lt;/a&gt;&lt;a name="10+November+2009+-+Solr+1.4+Released"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;10 November 2009 - Solr 1.4 Released&lt;/h3&gt;
 &lt;p&gt;
 	     Solr 1.4 has been released and is now available for public &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/"&gt;download&lt;/a&gt;!
@@ -385,7 +448,7 @@
 &lt;/ul&gt;
 &lt;p&gt;See the &lt;a href="http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.4.0/CHANGES.txt"&gt;release
notes&lt;/a&gt; for more details.
 	 &lt;/p&gt;
-&lt;a name="N100DC"&gt;&lt;/a&gt;&lt;a name="6+November+2009+-+Lucene+Java+2.9.1+available"&gt;&lt;/a&gt;
+&lt;a name="N1012C"&gt;&lt;/a&gt;&lt;a name="6+November+2009+-+Lucene+Java+2.9.1+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;6 November 2009 - Lucene Java 2.9.1 available&lt;/h3&gt;
 &lt;p&gt;
 		This release fixes bugs from 2.9.0, including one
@@ -423,7 +486,7 @@
 	        Maven artifacts are available 
 	        &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
 	      &lt;/p&gt;
-&lt;a name="N10104"&gt;&lt;/a&gt;&lt;a name="25+September+2009+-+Lucene+Java+2.9.0+available"&gt;&lt;/a&gt;
+&lt;a name="N10154"&gt;&lt;/a&gt;&lt;a name="25+September+2009+-+Lucene+Java+2.9.0+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;25 September 2009 - Lucene Java 2.9.0 available&lt;/h3&gt;
 &lt;p&gt;
 	            This release has many improvements since release 2.4.1, including:
@@ -496,7 +559,7 @@
 	            Maven artifacts are available 
 	            &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
 	          &lt;/p&gt;
-&lt;a name="N1014D"&gt;&lt;/a&gt;&lt;a name="14+August+2009+-+Lucene+at+US+ApacheCon"&gt;&lt;/a&gt;
+&lt;a name="N1019D"&gt;&lt;/a&gt;&lt;a name="14+August+2009+-+Lucene+at+US+ApacheCon"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;14 August 2009 - Lucene at US ApacheCon&lt;/h3&gt;
 &lt;p&gt;
 	         
@@ -552,12 +615,12 @@
 &lt;a href="http://www.us.apachecon.com/c/acus2009/sessions/462"&gt;Realtime Search&lt;/a&gt;
- Jason Rutherglen @ 15:00&lt;/li&gt;
 			
 &lt;/ul&gt;
-&lt;a name="N101BD"&gt;&lt;/a&gt;&lt;a name="25+June+2009+-+Apache+Open+Relevance+Kickoff"&gt;&lt;/a&gt;
+&lt;a name="N1020D"&gt;&lt;/a&gt;&lt;a name="25+June+2009+-+Apache+Open+Relevance+Kickoff"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;25 June 2009 - Apache Open Relevance Kickoff&lt;/h3&gt;
 &lt;p&gt;The Apache Lucene PMC has officially voted to add the Open Relevance Project (ORP)
as a Lucene subproject.  ORP's main goal is to build out collections, judgments and queries
in an open environment to make it easier for Lucene developers and users to do relevance testing,
much like one would get if using &lt;a href="http://trec.nist.gov"&gt;TREC&lt;/a&gt; or
 			other evaluation conferences.&lt;/p&gt;
 &lt;p&gt;See &lt;a href="http://lucene.apache.org/openrelevance"&gt;http://lucene.apache.org/openrelevance&lt;/a&gt;
for more info&lt;/p&gt;
-&lt;a name="N101D2"&gt;&lt;/a&gt;&lt;a name="07+April+2009+-+Apache+Mahout+0.1+released"&gt;&lt;/a&gt;
+&lt;a name="N10222"&gt;&lt;/a&gt;&lt;a name="07+April+2009+-+Apache+Mahout+0.1+released"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;07 April 2009 - Apache Mahout 0.1 released&lt;/h3&gt;
 &lt;p&gt;The Apache Lucene project is pleased to announce the release of Apache Mahout 0.1.
 			Apache Mahout is a subproject of Apache Lucene with the goal of delivering scalable
@@ -582,7 +645,7 @@
 			
 &lt;/ul&gt;
 &lt;p&gt;More info is available on the Mahout &lt;a href="http://lucene.apache.org/mahout"&gt;website&lt;/a&gt;.&lt;/p&gt;
-&lt;a name="N101F7"&gt;&lt;/a&gt;&lt;a name="9+March+2009+-+Lucene+Java+2.4.1+available"&gt;&lt;/a&gt;
+&lt;a name="N10247"&gt;&lt;/a&gt;&lt;a name="9+March+2009+-+Lucene+Java+2.4.1+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;9 March 2009 - Lucene Java 2.4.1 available&lt;/h3&gt;
 &lt;p&gt;
                 This release contains fixes for bugs found in 2.4.0,
@@ -606,7 +669,7 @@
                 Maven artifacts are available 
                 &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
               &lt;/p&gt;
-&lt;a name="N1021D"&gt;&lt;/a&gt;&lt;a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"&gt;&lt;/a&gt;
+&lt;a name="N1026D"&gt;&lt;/a&gt;&lt;a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;09 February 2009 - Lucene at ApacheCon Europe 2009 in Amsterdam&lt;/h3&gt;
 &lt;p&gt;
 	         
@@ -644,11 +707,11 @@
 
 	        
 &lt;/ul&gt;
-&lt;a name="N10266"&gt;&lt;/a&gt;&lt;a name="19+January+2009+-+PyLucene+joins+the+Lucene+TLP"&gt;&lt;/a&gt;
+&lt;a name="N102B6"&gt;&lt;/a&gt;&lt;a name="19+January+2009+-+PyLucene+joins+the+Lucene+TLP"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;19 January 2009 - PyLucene joins the Lucene TLP&lt;/h3&gt;
 &lt;p&gt;
 &lt;a href="http://lucene.apache.org/pylucene"&gt;PyLucene&lt;/a&gt;, the Python based port
of Lucene is now an official Lucene subproject.&lt;/p&gt;
-&lt;a name="N10273"&gt;&lt;/a&gt;&lt;a name="8+October+2008+-+Lucene+Java+2.4.0+available"&gt;&lt;/a&gt;
+&lt;a name="N102C3"&gt;&lt;/a&gt;&lt;a name="8+October+2008+-+Lucene+Java+2.4.0+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;8 October 2008 - Lucene Java 2.4.0 available&lt;/h3&gt;
 &lt;p&gt;
             Lucene 2.4.0 is available for public download.  This version contains many enhancements
and bug fixes.  See
@@ -662,7 +725,7 @@
             Maven artifacts are available 
             &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
           &lt;/p&gt;
-&lt;a name="N1028F"&gt;&lt;/a&gt;&lt;a name="15+September+2008+-+Solr+1.3.0+Available"&gt;&lt;/a&gt;
+&lt;a name="N102DF"&gt;&lt;/a&gt;&lt;a name="15+September+2008+-+Solr+1.3.0+Available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;15 September 2008 - Solr 1.3.0 Available&lt;/h3&gt;
 &lt;p&gt;Solr 1.3.0 is available for public download.  This version contains many enhancements
and bug fixes, including distributed search capabilities,
 				Lucene 2.3.x performance improvements and many others.

Modified: lucene/site/publish/index.pdf
URL: http://svn.apache.org/viewvc/lucene/site/publish/index.pdf?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/basic.css
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/basic.css?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
--- lucene/site/publish/skin/basic.css (original)
+++ lucene/site/publish/skin/basic.css Thu Nov 26 07:52:14 2009
@@ -163,4 +163,4 @@
 .codefrag {
   font-family: "Courier New", Courier, monospace;
   font-size: 110%;
-}
\ No newline at end of file
+}

Modified: lucene/site/publish/skin/images/rc-b-l-15-1body-2menu-3menu.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-b-l-15-1body-2menu-3menu.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-b-r-15-1body-2menu-3menu.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-b-r-15-1body-2menu-3menu.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-r-15-1body-2menu-3menu.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-r-15-1body-2menu-3menu.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/print.css
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/print.css?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
--- lucene/site/publish/skin/print.css (original)
+++ lucene/site/publish/skin/print.css Thu Nov 26 07:52:14 2009
@@ -51,4 +51,4 @@
 
 acronym {
   border: 0;
-}
\ No newline at end of file
+}

Modified: lucene/site/publish/skin/profile.css
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/profile.css?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
--- lucene/site/publish/skin/profile.css (original)
+++ lucene/site/publish/skin/profile.css Thu Nov 26 07:52:14 2009
@@ -164,4 +164,4 @@
     #footer a:visited { color:black }
     #footer a:hover { color:black }
     #footer a { color:black }
-  
\ No newline at end of file
+  

Modified: lucene/site/publish/skin/screen.css
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/screen.css?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
--- lucene/site/publish/skin/screen.css (original)
+++ lucene/site/publish/skin/screen.css Thu Nov 26 07:52:14 2009
@@ -584,4 +584,4 @@
   list-style-image: url('../images/instruction_arrow.png');
   list-style-position: outside;
   margin-left: 2em;
-} 
\ No newline at end of file
+} 

Modified: lucene/site/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/lucene/site/src/documentation/content/xdocs/index.xml?rev=884442&amp;r1=884441&amp;r2=884442&amp;view=diff
==============================================================================
--- lucene/site/src/documentation/content/xdocs/index.xml (original)
+++ lucene/site/src/documentation/content/xdocs/index.xml Thu Nov 26 07:52:14 2009
@@ -61,8 +61,58 @@
 
     &lt;section&gt;
       &lt;title&gt;News&lt;/title&gt;
+       &lt;section&gt;
+        &lt;title&gt;25 November 2009 - Lucene Java 3.0.0 available&lt;/title&gt;
+        &lt;p&gt;
+          The new version is mostly a cleanup release without any new features. All
+          deprecations targeted to be removed in version 3.0 were removed. If you are
+          upgrading from version 2.9.1 of Lucene, you have to fix all deprecation
+          warnings in your code base to be able to recompile against this version.
+        &lt;/p&gt;&lt;p&gt;
+          This is the first Lucene release with Java 5 as a minimum requirement. The
+          API was cleaned up to make use of Java 5's generics, varargs, enums, and
+          autoboxing. New users of Lucene are advised to use this version for new
+          developments, because it has a clean, type safe new API. Upgrading users can
+          now remove unnecessary casts and add generics to their code, too. If you
+          have not upgraded your installation to Java 5, please read the file
+          &lt;code&gt;JRE_VERSION_MIGRATION.txt&lt;/code&gt; &lt;em&gt;(please note that
this is not related to Lucene
+          3.0, it will also happen with any previous release when you upgrade your
+          Java environment)&lt;/em&gt;.
+        &lt;/p&gt;&lt;p&gt;
+          Lucene 3.0 has some changes regarding compressed fields: 2.9 already
+          deprecated compressed fields; support for them was removed now. Lucene 3.0
+          is still able to read indexes with compressed fields, but as soon as merges
+          occur or the index is optimized, all compressed fields are decompressed and
+          converted to &lt;code&gt;Field.Store.YES&lt;/code&gt;. Because of this, indexes
with compressed
+          fields can suddenly get larger.
+        &lt;/p&gt;&lt;p&gt;
+          While we generally try and maintain full backwards compatibility between
+          major versions, Lucene 3.0 has some minor breaks, mostly related to
+          deprecation removal, pointed out in the 'Changes in backwards compatibility
+          policy' section of &lt;a href="http://lucene.apache.org/java/3_0_0/changes/Changes.html"&gt;CHANGES.txt&lt;/a&gt;.
+          Notable are:
+        &lt;/p&gt;&lt;ul&gt;
+          &lt;li&gt;&lt;code&gt;IndexReader.open(Directory)&lt;/code&gt; now opens in read-only
mode per default
+          (this method was deprecated because of that in 2.9). The same occurs to
+          &lt;code&gt;IndexSearcher&lt;/code&gt;.&lt;/li&gt;
+          &lt;li&gt;Already started in 2.9, core &lt;code&gt;TokenStream&lt;/code&gt;s are
now made
+          final to enforce the decorator pattern.&lt;/li&gt;
+          &lt;li&gt;If you interrupt an &lt;code&gt;IndexWriter&lt;/code&gt; merge thread,
+          &lt;code&gt;IndexWriter&lt;/code&gt; now throws an unchecked
+          &lt;code&gt;ThreadInterruptedException&lt;/code&gt; that extends &lt;code&gt;RuntimeException&lt;/code&gt;
and
+          clears the interrupt status.&lt;/li&gt;
+	      &lt;/ul&gt;
+	      &lt;p&gt;
+	        See &lt;a href="http://lucene.apache.org/java/3_0_0/changes/Changes.html"&gt;CHANGES&lt;/a&gt;
for details.
+        &lt;/p&gt;&lt;p&gt;
+	        &lt;strong&gt;Binary and source distributions are available
+	        &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/java/"&gt;here&lt;/a&gt;.&lt;/strong&gt;
+          Maven artifacts are available 
+	        &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
+	      &lt;/p&gt;
+           &lt;/section&gt;
 	&lt;section&gt;
-        &lt;title&gt;17 Nov. 2009 - Apache Mahout 0.2 released&lt;/title&gt;
+        &lt;title&gt;17 November 2009 - Apache Mahout 0.2 released&lt;/title&gt;
         &lt;p&gt;The Apache Lucene project is pleased to announce the release of Apache Mahout
0.2.&lt;/p&gt;
         &lt;p&gt;
           Highlights include:




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r883984 - in /lucene/pylucene/trunk: ./ samples/LuceneInAction/lia/advsearching/ samples/LuceneInAction/lia/analysis/ samples/LuceneInAction/lia/searching/ samples/LuceneInAction/lia/tools/</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091125055349.6981F23888C5@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091125055349-6981F23888C5@eris-apache-org%3e</id>
<updated>2009-11-25T05:53:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Wed Nov 25 05:53:48 2009
New Revision: 883984

URL: http://svn.apache.org/viewvc?rev=883984&amp;view=rev
Log:
refreshed more Lucene in Action samples to 3.0 API

Modified:
    lucene/pylucene/trunk/Makefile
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/BooksLikeThis.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerDemo.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/Explainer.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightIt.py

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=883984&amp;r1=883983&amp;r2=883984&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Wed Nov 25 05:53:48 2009
@@ -197,6 +197,7 @@
            --package java.util \
                      java.util.Arrays \
                      java.text.SimpleDateFormat \
+                     java.text.DecimalFormat \
                      java.text.Collator \
            --package java.io java.io.StringReader \
                              java.io.InputStreamReader \
@@ -254,6 +255,12 @@
 test: install-test samples/LuceneInAction/index
 	find test -name 'test_*.py' | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
 	ls samples/LuceneInAction/*Test.py | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
+	$(PYTHON) samples/LuceneInAction/AnalyzerDemo.py
+	$(PYTHON) samples/LuceneInAction/AnalyzerUtils.py
+	$(PYTHON) samples/LuceneInAction/BooksLikeThis.py
+	$(PYTHON) samples/LuceneInAction/Explainer.py samples/LuceneInAction/index programming
+	$(PYTHON) samples/LuceneInAction/HighlightIt.py
+	$(PYTHON) samples/LuceneInAction/SortingExample.py
 
 
 ARCHIVE=pylucene-$(VERSION)-src.tar.gz

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/BooksLikeThis.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/BooksLikeThis.py?rev=883984&amp;r1=883983&amp;r2=883984&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/BooksLikeThis.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/BooksLikeThis.py Wed Nov
25 05:53:48 2009
@@ -16,7 +16,7 @@
 
 from lucene import \
      Document, IndexReader, Term, BooleanQuery, IndexSearcher, TermQuery, \
-     FSDirectory, System, BooleanClause, Hit
+     SimpleFSDirectory, File, System, BooleanClause
 
 
 class BooksLikeThis(object):
@@ -24,9 +24,9 @@
     def main(cls, argv):
 
         indexDir = System.getProperty("index.dir")
-        directory = FSDirectory.getDirectory(indexDir, False)
+        directory = SimpleFSDirectory(File(indexDir))
 
-        reader = IndexReader.open(directory)
+        reader = IndexReader.open(directory, True)
         blt = BooksLikeThis(reader)
 
         for id in xrange(reader.maxDoc()):
@@ -73,12 +73,11 @@
                           BooleanClause.Occur.MUST_NOT)
 
         print "  Query:", likeThisQuery.toString("contents")
-        hits = self.searcher.search(likeThisQuery)
+        scoreDocs = self.searcher.search(likeThisQuery, 50).scoreDocs
 
         docs = []
-        for hit in hits:
-            hit = Hit.cast_(hit)
-            doc = hit.getDocument()
+        for scoreDoc in scoreDocs:
+            doc = self.searcher.doc(scoreDoc.doc)
             if len(docs) &lt; max:
                 docs.append(doc)
             else:

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py?rev=883984&amp;r1=883983&amp;r2=883984&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SortingExample.py Wed Nov
25 05:53:48 2009
@@ -15,8 +15,9 @@
 import os
 
 from lucene import \
-     FSDirectory, Document, Field, IndexSearcher, SimpleAnalyzer, \
-     RangeQuery, Sort, SortField, DecimalFormat, System, Term
+    SimpleFSDirectory, Document, Field, IndexSearcher, StandardAnalyzer, \
+    MatchAllDocsQuery, Sort, SortField, DecimalFormat, System, File, \
+    TopFieldCollector, QueryParser, Version, BooleanQuery, BooleanClause
 
 
 class SortingExample(object):
@@ -25,51 +26,71 @@
 
         self.directory = directory
 
-    def displayHits(self, query, sort):
+    def displayResults(self, query, sort):
 
-        searcher = IndexSearcher(self.directory)
-        hits = searcher.search(query, sort)
+        searcher = IndexSearcher(self.directory, True)
+
+        fillFields = False
+        computeMaxScore = False
+        docsScoredInOrder = False
+        computeScores = True
+
+        collector = TopFieldCollector.create(sort, 20,
+                                             fillFields,
+                                             computeScores,
+                                             computeMaxScore,
+                                             docsScoredInOrder)
+
+        searcher.search(query, None, collector)
+        scoreDocs = collector.topDocs().scoreDocs
 
         print "\nResults for:", query, "sorted by", sort
         print "Title".rjust(30), "pubmonth".rjust(10), \
               "id".center(4), "score".center(15)
 
         scoreFormatter = DecimalFormat("0.######")
-        for i, doc in hits:
+        for scoreDoc in scoreDocs:
+            doc = searcher.doc(scoreDoc.doc)
             title = doc["title"]
             if len(title) &gt; 30:
                 title = title[:30]
             print title.encode('ascii', 'replace').rjust(30), \
                   doc["pubmonth"].rjust(10), \
-                  str(hits.id(i)).center(4), \
-                  scoreFormatter.format(hits.score(i)).ljust(12)
+                  str(scoreDoc.doc).center(4), \
+                  scoreFormatter.format(scoreDoc.score).ljust(12)
             print "  ", doc["category"]
-            # print searcher.explain(query, hits.id(i))
+            # print searcher.explain(query, scoreDoc.doc)
 
         searcher.close()
 
     def main(cls, argv):
 
-        earliest = Term("pubmonth", "190001")
-        latest = Term("pubmonth", "201012")
-        allBooks = RangeQuery(earliest, latest, True)
+        allBooks = MatchAllDocsQuery()
+        parser = QueryParser(Version.LUCENE_CURRENT, "contents",
+                             StandardAnalyzer(Version.LUCENE_CURRENT))
+        query = BooleanQuery()
+        query.add(allBooks, BooleanClause.Occur.SHOULD)
+        query.add(parser.parse("java OR action"), BooleanClause.Occur.SHOULD)
 
         indexDir = System.getProperty("index.dir")
-        directory = FSDirectory.getDirectory(indexDir, False)
-        example = SortingExample(directory)
+        directory = SimpleFSDirectory(File(indexDir))
 
-        example.displayHits(allBooks, Sort.RELEVANCE)
-        example.displayHits(allBooks, Sort.INDEXORDER)
-        example.displayHits(allBooks, Sort("category"))
-        example.displayHits(allBooks, Sort("pubmonth", True))
-
-        example.displayHits(allBooks,
-                            Sort([SortField("category"),
-                                  SortField.FIELD_SCORE,
-                                  SortField("pubmonth", SortField.INT, True)]))
-
-        example.displayHits(allBooks,
-                            Sort([SortField.FIELD_SCORE,
-                                  SortField("category")]))
+        example = SortingExample(directory)
+        example.displayResults(query, Sort.RELEVANCE)
+        example.displayResults(query, Sort.INDEXORDER)
+        example.displayResults(query, Sort(SortField("category",
+                                                     SortField.STRING)))
+        example.displayResults(query, Sort(SortField("pubmonth",
+                                                     SortField.INT, True)))
+
+        example.displayResults(query,
+                               Sort([SortField("category", SortField.STRING),
+                                     SortField.FIELD_SCORE,
+                                     SortField("pubmonth", SortField.INT, True)]))
+
+        example.displayResults(query,
+                               Sort([SortField.FIELD_SCORE,
+                                     SortField("category", SortField.STRING)]))
+        directory.close()
 
     main = classmethod(main)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerDemo.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerDemo.py?rev=883984&amp;r1=883983&amp;r2=883984&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerDemo.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerDemo.py Wed Nov 25 05:53:48
2009
@@ -14,7 +14,7 @@
 
 
 from lia.analysis.AnalyzerUtils import AnalyzerUtils
-from lucene import \
+from lucene import Version, \
      StopAnalyzer, SimpleAnalyzer, WhitespaceAnalyzer, StandardAnalyzer
 
 
@@ -25,8 +25,8 @@
     
     analyzers = [WhitespaceAnalyzer(),
                  SimpleAnalyzer(),
-                 StopAnalyzer(),
-                 StandardAnalyzer()]
+                 StopAnalyzer(Version.LUCENE_CURRENT),
+                 StandardAnalyzer(Version.LUCENE_CURRENT)]
 
     def main(cls, argv):
 
@@ -42,14 +42,14 @@
 
     def analyze(cls, text):
 
-        print'"Analyzing "', text, '"'
+        print 'Analyzing "%s"' %(text)
 
         for analyzer in cls.analyzers:
             name = type(analyzer).__name__
             print " %s:" %(name),
             AnalyzerUtils.displayTokens(analyzer, text)
-            print ''
-        print ''
+            print
+        print
 
     main = classmethod(main)
     analyze = classmethod(analyze)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py?rev=883984&amp;r1=883983&amp;r2=883984&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py Wed Nov 25
05:53:48 2009
@@ -59,7 +59,7 @@
         term = tokenStream.addAttribute(TermAttribute.class_)
 
         while tokenStream.incrementToken():
-            print "[%s]" %(term.term())
+            print "[%s]" %(term.term()),
 
     def displayTokensWithPositions(cls, analyzer, text):
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/Explainer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/Explainer.py?rev=883984&amp;r1=883983&amp;r2=883984&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/Explainer.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/Explainer.py Wed Nov 25 05:53:48
2009
@@ -16,7 +16,7 @@
 
 from lucene import \
      SimpleAnalyzer, Document, QueryParser, Explanation, \
-     IndexSearcher, FSDirectory, Hit
+     IndexSearcher, SimpleFSDirectory, File, Version
 
 
 class Explainer(object):
@@ -30,21 +30,18 @@
             indexDir = argv[1]
             queryExpression = argv[2]
 
-            directory = FSDirectory.getDirectory(indexDir, False)
-
-            query = QueryParser("contents",
+            directory = SimpleFSDirectory(File(indexDir))
+            query = QueryParser(Version.LUCENE_CURRENT, "contents",
                                 SimpleAnalyzer()).parse(queryExpression)
 
             print "Query:", queryExpression
 
             searcher = IndexSearcher(directory)
-            hits = searcher.search(query)
+            scoreDocs = searcher.search(query, 50).scoreDocs
 
-            for hit in hits:
-                hit = Hit.cast_(hit)
-                doc = hit.getDocument()
-                id = hit.getId()
-                explanation = searcher.explain(query, id)
+            for scoreDoc in scoreDocs:
+                doc = searcher.doc(scoreDoc.doc)
+                explanation = searcher.explain(query, scoreDoc.doc)
                 print "----------"
                 print doc["title"].encode('utf-8')
                 print explanation

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightIt.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightIt.py?rev=883984&amp;r1=883983&amp;r2=883984&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightIt.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightIt.py Wed Nov 25 05:53:48
2009
@@ -15,7 +15,7 @@
 from sys import stdout
 
 from lucene import \
-     StandardAnalyzer, Term, TermQuery, StringReader, \
+     StandardAnalyzer, Term, TermQuery, StringReader, Version, \
      Fragmenter, Highlighter, QueryScorer, SimpleFragmenter, SimpleHTMLFormatter
 
 
@@ -51,7 +51,7 @@
         fragmenter = SimpleFragmenter(50)
         highlighter.setTextFragmenter(fragmenter)
 
-        analyzer = StandardAnalyzer()
+        analyzer = StandardAnalyzer(Version.LUCENE_CURRENT)
         tokenStream = analyzer.tokenStream("f", StringReader(cls.text))
         result = highlighter.getBestFragments(tokenStream, cls.text, 5, "...")
 




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r883975 [3/3] - in /lucene/pylucene/trunk: ./ java/org/apache/pylucene/search/ jcc/ samples/LuceneInAction/ samples/LuceneInAction/lia/advsearching/ samples/LuceneInAction/lia/analysis/ samples/LuceneInAction/lia/analysis/i18n/ samples/Luce...</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091125040820.4145423889D2@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091125040820-4145423889D2@eris-apache-org%3e</id>
<updated>2009-11-25T04:08:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/ScoreTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/ScoreTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/ScoreTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/ScoreTest.py Wed Nov 25 04:08:13
2009
@@ -31,29 +31,33 @@
 
         class SimpleSimilarity(PythonSimilarity):
 
-            def lengthNorm(self, field, numTerms):
+            def lengthNorm(_self, field, numTerms):
                 return 1.0
 
-            def queryNorm(self, sumOfSquaredWeights):
+            def queryNorm(_self, sumOfSquaredWeights):
                 return 1.0
 
-            def tf(self, freq):
+            def tf(_self, freq):
                 return freq
 
-            def sloppyFreq(self, distance):
+            def sloppyFreq(_self, distance):
                 return 2.0
 
-            def idfTerms(self, terms, searcher):
+            def idfTerms(_self, terms, searcher):
                 return 1.0
 
-            def idfTerm(self, docFreq, numDocs):
+            def idf(_self, docFreq, numDocs):
                 return 1.0
 
-            def coord(self, overlap, maxOverlap):
+            def coord(_self, overlap, maxOverlap):
+                return 1.0
+
+            def scorePayload(_self, docId, fieldName, start, end, payload,
+                             offset, length):
                 return 1.0
 
         self.indexSingleFieldDocs([Field("contents", "x", Field.Store.YES,
-                                         Field.Index.TOKENIZED)])
+                                         Field.Index.ANALYZED)])
         searcher = IndexSearcher(self.directory)
         searcher.setSimilarity(SimpleSimilarity())
 
@@ -61,15 +65,16 @@
         explanation = searcher.explain(query, 0)
         print explanation
 
-        hits = searcher.search(query)
-        self.assertEqual(1, hits.length())
+        scoreDocs = searcher.search(query, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs))
 
-        self.assertEqual(hits.score(0), 1.0)
+        self.assertEqual(scoreDocs[0].score, 1.0)
         searcher.close()
 
     def indexSingleFieldDocs(self, fields):
 
-        writer = IndexWriter(self.directory, WhitespaceAnalyzer(), True)
+        writer = IndexWriter(self.directory, WhitespaceAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
 
         for field in fields:
             doc = Document()
@@ -82,33 +87,38 @@
     def testWildcard(self):
 
         self.indexSingleFieldDocs([Field("contents", "wild", Field.Store.YES,
-                                         Field.Index.TOKENIZED),
+                                         Field.Index.ANALYZED),
                                    Field("contents", "child", Field.Store.YES,
-                                         Field.Index.TOKENIZED),
+                                         Field.Index.ANALYZED),
                                    Field("contents", "mild", Field.Store.YES,
-                                         Field.Index.TOKENIZED),
+                                         Field.Index.ANALYZED),
                                    Field("contents", "mildew", Field.Store.YES,
-                                         Field.Index.TOKENIZED)])
+                                         Field.Index.ANALYZED)])
 
         searcher = IndexSearcher(self.directory)
         query = WildcardQuery(Term("contents", "?ild*"))
-        hits = searcher.search(query)
-        self.assertEqual(3, hits.length(), "child no match")
+        scoreDocs = searcher.search(query, 50).scoreDocs
+        self.assertEqual(3, len(scoreDocs), "child no match")
 
-        self.assertEqual(hits.score(0), hits.score(1), "score the same")
-        self.assertEqual(hits.score(1), hits.score(2), "score the same")
+        self.assertEqual(scoreDocs[0].score, scoreDocs[1].score,
+                         "score the same")
+        self.assertEqual(scoreDocs[1].score, scoreDocs[1].score,
+                         "score the same")
 
     def testFuzzy(self):
 
         self.indexSingleFieldDocs([Field("contents", "fuzzy", Field.Store.YES,
-                                         Field.Index.TOKENIZED),
+                                         Field.Index.ANALYZED),
                                    Field("contents", "wuzzy", Field.Store.YES,
-                                         Field.Index.TOKENIZED)])
+                                         Field.Index.ANALYZED)])
 
         searcher = IndexSearcher(self.directory)
         query = FuzzyQuery(Term("contents", "wuzza"))
-        hits = searcher.search(query)
-        self.assertEqual(2, hits.length(), "both close enough")
+        scoreDocs = searcher.search(query, 50).scoreDocs
+        self.assertEqual(2, len(scoreDocs), "both close enough")
 
-        self.assert_(hits.score(0) !=  hits.score(1), "wuzzy closer than fuzzy")
-        self.assertEqual("wuzzy", hits.doc(0).get("contents"), "wuzza bear")
+        self.assert_(scoreDocs[0].score != scoreDocs[1].score,
+                     "wuzzy closer than fuzzy")
+        self.assertEqual("wuzzy",
+                         searcher.doc(scoreDocs[0].doc).get("contents"),
+                         "wuzza bear")

Copied: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/TermRangeQueryTest.py (from
r820102, lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/RangeQueryTest.py)
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/TermRangeQueryTest.py?p2=lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/TermRangeQueryTest.py&amp;p1=lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/RangeQueryTest.py&amp;r1=820102&amp;r2=883975&amp;rev=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/RangeQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/TermRangeQueryTest.py Wed Nov
25 04:08:13 2009
@@ -14,32 +14,16 @@
 
 from lia.common.LiaTestCase import LiaTestCase
 
-from lucene import Term, IndexSearcher, RangeQuery
+from lucene import Term, IndexSearcher, TermRangeQuery
 
 
-class RangeQueryTest(LiaTestCase):
+class TermRangeQueryTest(LiaTestCase):
 
-    def setUp(self):
+    def testTermRangeQuery(self):
 
-        super(RangeQueryTest, self).setUp()
+        searcher = IndexSearcher(self.directory, True)
+        query = TermRangeQuery("title2", "d", "j", True, True)
 
-        self.begin = Term("pubmonth", "198805")
-
-        # pub date of TTC was October 1988
-        self.end = Term("pubmonth", "198810")
-
-    def testInclusive(self):
-
-        query = RangeQuery(self.begin, self.end, True)
-        searcher = IndexSearcher(self.directory)
-
-        hits = searcher.search(query)
-        self.assertEqual(1, hits.length(), "tao")
-
-    def testExclusive(self):
-
-        query = RangeQuery(self.begin, self.end, False)
-        searcher = IndexSearcher(self.directory)
-
-        hits = searcher.search(query)
-        self.assertEqual(0, hits.length(), "there is no tao")
+        topDocs = searcher.search(query, 100)
+        self.assertEqual(3, topDocs.totalHits)
+        searcher.close()

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightTest.py Wed Nov 25 04:08:13
2009
@@ -16,7 +16,7 @@
 
 from lucene import \
      SimpleAnalyzer, Term, IndexSearcher, TermQuery, \
-     Highlighter, QueryScorer, StringReader, Hit
+     Highlighter, QueryScorer, StringReader, Version
 
 
 class HighlightTest(LiaTestCase):
@@ -29,24 +29,24 @@
         scorer = QueryScorer(query)
         highlighter = Highlighter(scorer)
 
-        tokenStream = SimpleAnalyzer().tokenStream("field", StringReader(text))
+        tokenStream = SimpleAnalyzer(Version.LUCENE_CURRENT).tokenStream("field", StringReader(text))
 
         self.assertEqual("The quick brown &lt;B&gt;fox&lt;/B&gt; jumps over the lazy dog",
                          highlighter.getBestFragment(tokenStream, text))
 
     def testHits(self):
 
-        searcher = IndexSearcher(self.directory)
+        searcher = IndexSearcher(self.directory, True)
         query = TermQuery(Term("title", "action"))
-        hits = searcher.search(query)
+        scoreDocs = searcher.search(query, 50).scoreDocs
 
         scorer = QueryScorer(query)
         highlighter = Highlighter(scorer)
 
-        for hit in hits:
-            doc = Hit.cast_(hit).getDocument()
+        for scoreDoc in scoreDocs:
+            doc = searcher.doc(scoreDoc.doc)
             title = doc["title"]
-            stream = SimpleAnalyzer().tokenStream("title", StringReader(title))
+            stream = SimpleAnalyzer(Version.LUCENE_CURRENT).tokenStream("title", StringReader(title))
             fragment = highlighter.getBestFragment(stream, title)
     
             print fragment

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/SnowballTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/SnowballTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/SnowballTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/SnowballTest.py Wed Nov 25 04:08:13
2009
@@ -13,30 +13,19 @@
 # ====================================================================
 
 from unittest import TestCase
-from lucene import SnowballAnalyzer, Token, StringReader
+from lucene import SnowballAnalyzer, StringReader, Version
+from lia.analysis.AnalyzerUtils import AnalyzerUtils
 
 
 class SnowballTest(TestCase):
 
     def testEnglish(self):
 
-        analyzer = SnowballAnalyzer("English")
-        self.assertAnalyzesTo(analyzer, "stemming algorithms",
-                              ["stem", "algorithm"])
+        analyzer = SnowballAnalyzer(Version.LUCENE_CURRENT, "English")
+        AnalyzerUtils.assertAnalyzesTo(analyzer, "stemming algorithms",
+                                       ["stem", "algorithm"])
 
     def testSpanish(self):
 
-        analyzer = SnowballAnalyzer("Spanish")
-        self.assertAnalyzesTo(analyzer, "algoritmos", ["algoritm"])
-
-    def assertAnalyzesTo(self, analyzer, input, output):
-
-        stream = analyzer.tokenStream("field", StringReader(input))
-
-        for text in output:
-            token = stream.next()
-            self.assert_(token)
-            self.assertEqual(text, token.termText())
-
-        self.assert_(not list(stream))
-        stream.close()
+        analyzer = SnowballAnalyzer(Version.LUCENE_CURRENT, "Spanish")
+        AnalyzerUtils.assertAnalyzesTo(analyzer, "algoritmos", ["algoritm"])

Modified: lucene/pylucene/trunk/test/test_Similarity.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Similarity.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Similarity.py (original)
+++ lucene/pylucene/trunk/test/test_Similarity.py Wed Nov 25 04:08:13 2009
@@ -30,10 +30,10 @@
     def sloppyFreq(self, distance):
         return 2.0
 
-    def idf(self, docFreq, numDocs):
+    def idfTerms(self, terms, searcher):
         return 1.0
 
-    def idfTerms(self, terms, searcher):
+    def idf(self, docFreq, numDocs):
         return 1.0
 
     def coord(self, overlap, maxOverlap):




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r883975 [2/3] - in /lucene/pylucene/trunk: ./ java/org/apache/pylucene/search/ jcc/ samples/LuceneInAction/ samples/LuceneInAction/lia/advsearching/ samples/LuceneInAction/lia/analysis/ samples/LuceneInAction/lia/analysis/i18n/ samples/Luce...</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091125040820.3C68223889CF@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091125040820-3C68223889CF@eris-apache-org%3e</id>
<updated>2009-11-25T04:08:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/queryparser/AnalysisParalysisTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/queryparser/AnalysisParalysisTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/queryparser/AnalysisParalysisTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/queryparser/AnalysisParalysisTest.py Wed Nov 25 04:08:13 2009
@@ -15,24 +15,27 @@
 from lia.common.LiaTestCase import LiaTestCase
 
 from lucene import \
-     QueryParser, StandardAnalyzer, PerFieldAnalyzerWrapper, WhitespaceAnalyzer
+    QueryParser, StandardAnalyzer, PerFieldAnalyzerWrapper, \
+    WhitespaceAnalyzer, Version
 
 
 class AnalysisParalysisTest(LiaTestCase):
 
     def testAnalyzer(self):
 
-        analyzer = StandardAnalyzer()
+        analyzer = StandardAnalyzer(Version.LUCENE_CURRENT)
         queryString = "category:/philosophy/eastern"
 
-        query = QueryParser("contents", analyzer).parse(queryString)
+        query = QueryParser(Version.LUCENE_CURRENT,
+                            "contents", analyzer).parse(queryString)
 
         self.assertEqual("category:\"philosophy eastern\"",
                          query.toString("contents"), "path got split, yikes!")
 
         perFieldAnalyzer = PerFieldAnalyzerWrapper(analyzer)
         perFieldAnalyzer.addAnalyzer("category", WhitespaceAnalyzer())
-        query = QueryParser("contents", perFieldAnalyzer).parse(queryString)
+        query = QueryParser(Version.LUCENE_CURRENT,
+                            "contents", perFieldAnalyzer).parse(queryString)
 
         self.assertEqual("category:/philosophy/eastern",
                          query.toString("contents"),

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzer2.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzer2.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzer2.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzer2.py Wed Nov 25 04:08:13 2009
@@ -24,11 +24,11 @@
     def __init__(self, stopWords=None):
 
         if stopWords is None:
-            self.stopWords = StopAnalyzer.ENGLISH_STOP_WORDS
+            self.stopWords = StopAnalyzer.ENGLISH_STOP_WORDS_SET
         else:
             self.stopWords = stopWords
 
     def tokenStream(self, fieldName, reader):
 
-        return StopFilter(LowerCaseFilter(LetterTokenizer(reader)),
+        return StopFilter(True, LowerCaseFilter(LetterTokenizer(reader)),
                           self.stopWords)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerAlternativeTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerAlternativeTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerAlternativeTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerAlternativeTest.py Wed Nov 25 04:08:13 2009
@@ -24,15 +24,15 @@
 
     def testStopAnalyzer2(self):
 
-        tokens = AnalyzerUtils.tokensFromAnalysis(StopAnalyzer2(),
-                                                  "The quick brown...")
-        AnalyzerUtils.assertTokensEqual(self, tokens, ["quick", "brown"])
+        AnalyzerUtils.assertAnalyzesTo(StopAnalyzer2(),
+                                       "The quick brown...",
+                                       ["quick", "brown"])
 
     def testStopAnalyzerFlawed(self):
 
-        tokens = AnalyzerUtils.tokensFromAnalysis(StopAnalyzerFlawed(),
-                                                  "The quick brown...")
-        self.assertEqual("the", tokens[0].termText())
+        AnalyzerUtils.assertAnalyzesTo(StopAnalyzerFlawed(),
+                                       "The quick brown...",
+                                       ["the", "quick", "brown"])
 
 
     #

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerFlawed.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerFlawed.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerFlawed.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerFlawed.py Wed Nov 25 04:08:13 2009
@@ -26,7 +26,7 @@
     def __init__(self, stopWords=None):
 
         if stopWords is None:
-            self.stopWords = StopAnalyzer.ENGLISH_STOP_WORDS
+            self.stopWords = StopAnalyzer.ENGLISH_STOP_WORDS_SET
         else:
             self.stopWords = stopWords
 
@@ -36,5 +36,5 @@
 
     def tokenStream(self, fieldName, reader):
 
-        return LowerCaseFilter(StopFilter(LetterTokenizer(reader),
+        return LowerCaseFilter(StopFilter(True, LetterTokenizer(reader),
                                           self.stopWords))

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerTest.py Wed Nov 25 04:08:13 2009
@@ -13,7 +13,7 @@
 # ====================================================================
 
 from unittest import TestCase
-from lucene import StopAnalyzer
+from lucene import StopAnalyzer, Version
 from lia.analysis.AnalyzerUtils import AnalyzerUtils
 
 
@@ -21,25 +21,17 @@
 
     def setUp(self):
 
-        self.stopAnalyzer = StopAnalyzer()
+        self.stopAnalyzer = StopAnalyzer(Version.LUCENE_CURRENT)
 
     def testHoles(self):
         
         expected = ["one", "enough"]
 
-        AnalyzerUtils.assertTokensEqual(self,
-                                        self.tokensFrom("one is not enough"),
-                                        expected)
-        AnalyzerUtils.assertTokensEqual(self,
-                                        self.tokensFrom("one is enough"),
-                                        expected)
-        AnalyzerUtils.assertTokensEqual(self,
-                                        self.tokensFrom("one enough"),
-                                        expected)
-        AnalyzerUtils.assertTokensEqual(self,
-                                        self.tokensFrom("one but not enough"),
-                                        expected)
-
-    def tokensFrom(self, text):
-
-        return AnalyzerUtils.tokensFromAnalysis(self.stopAnalyzer, text)
+        AnalyzerUtils.assertAnalyzesTo(self.stopAnalyzer, "one is not enough",
+                                       expected)
+        AnalyzerUtils.assertAnalyzesTo(self.stopAnalyzer, "one is enough",
+                                       expected)
+        AnalyzerUtils.assertAnalyzesTo(self.stopAnalyzer, "one enough",
+                                       expected)
+        AnalyzerUtils.assertAnalyzesTo(self.stopAnalyzer, "one but not enough",
+                                       expected)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzer.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzer.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzer.py Wed Nov 25 04:08:13 2009
@@ -13,7 +13,7 @@
 # ====================================================================
 
 from lucene import \
-     LowerCaseFilter, StopFilter, \
+     LowerCaseFilter, StopFilter, Version, \
      StandardAnalyzer, StandardTokenizer, StandardFilter, PythonAnalyzer
 
 from lia.analysis.synonym.SynonymFilter import SynonymFilter
@@ -31,7 +31,8 @@
 
     def tokenStream(self, fieldName, reader):
 
-        tokenStream = LowerCaseFilter(StandardFilter(StandardTokenizer(reader)))
-        tokenStream = StopFilter(tokenStream, StandardAnalyzer.STOP_WORDS)
+        tokenStream = LowerCaseFilter(StandardFilter(StandardTokenizer(Version.LUCENE_CURRENT, reader)))
+        tokenStream = StopFilter(True, tokenStream,
+                                 StandardAnalyzer.STOP_WORDS_SET)
         
         return SynonymFilter(tokenStream, self.engine)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzerTest.py Wed Nov 25 04:08:13 2009
@@ -16,7 +16,8 @@
 
 from lucene import \
      StandardAnalyzer, RAMDirectory, IndexWriter, Term, Document, Field, \
-     IndexSearcher, TermQuery, PhraseQuery, QueryParser
+     IndexSearcher, TermQuery, PhraseQuery, QueryParser, StringReader, \
+     TermAttribute, PositionIncrementAttribute, Version
 
 from lia.analysis.AnalyzerUtils import AnalyzerUtils
 from lia.analysis.synonym.SynonymAnalyzer import SynonymAnalyzer
@@ -30,16 +31,17 @@
     def setUp(self):
 
         self.directory = RAMDirectory()
-        writer = IndexWriter(self.directory, self.synonymAnalyzer, True)
+        writer = IndexWriter(self.directory, self.synonymAnalyzer, True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
 
         doc = Document()
         doc.add(Field("content",
                       "The quick brown fox jumps over the lazy dogs",
-                      Field.Store.YES, Field.Index.TOKENIZED))
+                      Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(doc)
         writer.close()
 
-        self.searcher = IndexSearcher(self.directory)
+        self.searcher = IndexSearcher(self.directory, True)
 
     def tearDown(self):
 
@@ -47,42 +49,54 @@
 
     def testJumps(self):
 
-        tokens = AnalyzerUtils.tokensFromAnalysis(self.synonymAnalyzer, "jumps")
-        AnalyzerUtils.assertTokensEqual(self, tokens,
-                                        ["jumps", "hops", "leaps"])
-
-        # ensure synonyms are in the same position as the original
-        self.assertEqual(1, tokens[0].getPositionIncrement(), "jumps")
-        self.assertEqual(0, tokens[1].getPositionIncrement(), "hops")
-        self.assertEqual(0, tokens[2].getPositionIncrement(), "leaps")
+        stream = self.synonymAnalyzer.tokenStream("contents",
+                                                  StringReader("jumps"))
+        term = stream.addAttribute(TermAttribute.class_)
+        posIncr = stream.addAttribute(PositionIncrementAttribute.class_)
+
+        i = 0
+        expected = ["jumps", "hops", "leaps"]
+        while stream.incrementToken():
+            self.assertEqual(expected[i], term.term())
+            if i == 0:
+                expectedPos = 1
+            else:
+                expectedPos = 0
+
+            self.assertEqual(expectedPos, posIncr.getPositionIncrement())
+            i += 1
+
+        self.assertEqual(3, i)
 
     def testSearchByAPI(self):
 
         tq = TermQuery(Term("content", "hops"))
-        hits = self.searcher.search(tq)
-        self.assertEqual(1, len(hits))
+        topDocs = self.searcher.search(tq, 50)
+        self.assertEqual(1, topDocs.totalHits)
 
         pq = PhraseQuery()
         pq.add(Term("content", "fox"))
         pq.add(Term("content", "hops"))
-        hits = self.searcher.search(pq)
-        self.assertEquals(1, len(hits))
+        topDocs = self.searcher.search(pq, 50)
+        self.assertEquals(1, topDocs.totalHits)
 
     def testWithQueryParser(self):
 
-        query = QueryParser("content",
+        query = QueryParser(Version.LUCENE_CURRENT, "content",
                             self.synonymAnalyzer).parse('"fox jumps"')
-        hits = self.searcher.search(query)
+        topDocs = self.searcher.search(query, 50)
         # in Lucene 1.9, position increments are no longer ignored
-        self.assertEqual(1, len(hits), "!!!! what?!")
+        self.assertEqual(1, topDocs.totalHits, "!!!! what?!")
 
-        query = QueryParser("content", StandardAnalyzer()).parse('"fox jumps"')
-        hits = self.searcher.search(query)
-        self.assertEqual(1, len(hits), "*whew*")
+        query = QueryParser(Version.LUCENE_CURRENT, "content",
+                            StandardAnalyzer(Version.LUCENE_CURRENT)).parse('"fox jumps"')
+        topDocs = self.searcher.search(query, 50)
+        self.assertEqual(1, topDocs.totalHits, "*whew*")
 
     def main(cls):
 
-        query = QueryParser("content", cls.synonymAnalyzer).parse('"fox jumps"')
+        query = QueryParser(Version.LUCENE_CURRENT, "content",
+                            cls.synonymAnalyzer).parse('"fox jumps"')
         print "\"fox jumps\" parses to ", query.toString("content")
 
         print "From AnalyzerUtils.tokensFromAnalysis: "

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymFilter.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymFilter.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymFilter.py Wed Nov 25 04:08:13 2009
@@ -12,44 +12,50 @@
 #   limitations under the License.
 # ====================================================================
 
-from lucene import Token, PythonTokenFilter
+from lucene import Token, PythonTokenFilter, TermAttribute
+from lia.analysis.AnalyzerUtils import AnalyzerUtils
 
 #
 # A TokenFilter extension
 #
 
 class SynonymFilter(PythonTokenFilter):
-
     TOKEN_TYPE_SYNONYM = "SYNONYM"
-    
-    def __init__(self, tokenStream, engine):
 
-        super(SynonymFilter, self).__init__(tokenStream)
+    def __init__(self, inStream, engine):
+        super(SynonymFilter, self).__init__(inStream)
 
         self.synonymStack = []
-        self.input = tokenStream
+        self.termAttr = self.addAttribute(TermAttribute.class_)
+        self.save = inStream.cloneAttributes()
         self.engine = engine
+        self.inStream = inStream
 
-    def next(self):
+    def incrementToken(self):
 
         if len(self.synonymStack) &gt; 0:
-            return self.synonymStack.pop()
+            syn = self.synonymStack.pop()
+            self.restoreState(syn)
+            return True
 
-        # this raises StopIteration which is cleared to return null to java
-        token = self.input.next()
-        self.addAliasesToStack(token)
+        if not self.inStream.incrementToken():
+            return False
 
-        return token
+        self.addAliasesToStack()
 
-    def addAliasesToStack(self, token):
+        return True
 
-        synonyms = self.engine.getSynonyms(token.termText())
+    def addAliasesToStack(self):
 
+        synonyms = self.engine.getSynonyms(self.termAttr.term())
         if synonyms is None:
             return
 
+        current = self.captureState()
+
         for synonym in synonyms:
-            synToken = Token(synonym, token.startOffset(), token.endOffset(),
-                             self.TOKEN_TYPE_SYNONYM)
-            synToken.setPositionIncrement(0)
-            self.synonymStack.append(synToken)
+            self.save.restoreState(current)
+            AnalyzerUtils.setTerm(self.save, synonym)
+            AnalyzerUtils.setType(self.save, self.TOKEN_TYPE_SYNONYM)
+            AnalyzerUtils.setPositionIncrement(self.save, 0)
+            self.synonymStack.append(self.save.captureState())

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/common/LiaTestCase.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/common/LiaTestCase.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/common/LiaTestCase.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/common/LiaTestCase.py Wed Nov 25 04:08:13 2009
@@ -15,7 +15,9 @@
 import os
 
 from unittest import TestCase
-from lucene import FSDirectory, Document, System, SimpleDateFormat, Hit
+from lucene import \
+    SimpleFSDirectory, Document, \
+    System, SimpleDateFormat, File
 
 
 class LiaTestCase(TestCase):
@@ -27,7 +29,7 @@
 
     def setUp(self):
 
-        self.directory = FSDirectory.getDirectory(self.indexDir, False)
+        self.directory = SimpleFSDirectory(File(self.indexDir))
 
     def tearDown(self):
 
@@ -36,25 +38,27 @@
     #
     # For troubleshooting
     #
-    def dumpHits(self, hits):
+    def dumpHits(self, searcher, scoreDocs):
 
-        if not hits:
+        if not scoreDocs:
             print "No hits"
         else:
-            for hit in hits:
-                hit = Hit.cast_(hit)
-                print "%s: %s" %(hit.getScore(),
-                                 hit.getDocument().get('title'))
+            for scoreDoc in scoreDocs:
+                print "%s: %s" %(scoreDoc.score,
+                                 searcher.doc(scoreDoc.doc).get('title'))
 
-    def assertHitsIncludeTitle(self, hits, title):
+    def assertHitsIncludeTitle(self, searcher, scoreDocs, title,
+                               fail=False):
 
-        for hit in hits:
-            doc = Hit.cast_(hit).getDocument()
+        for scoreDoc in scoreDocs:
+            doc = searcher.doc(scoreDoc.doc)
             if title == doc.get("title"):
-                self.assert_(True)
+                if fail:
+                    self.fail("title '%s' found" %(title))
                 return
 
-        self.fail("title '%s' not found" %(title))
+        if not fail:
+            self.fail("title '%s' not found" %(title))
 
     def parseDate(self, s):
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/common/TestDataDocumentHandler.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/common/TestDataDocumentHandler.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/common/TestDataDocumentHandler.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/common/TestDataDocumentHandler.py Wed Nov 25 04:08:13 2009
@@ -15,8 +15,8 @@
 import os
 
 from lucene import \
-    Document, Field, IndexWriter, StandardAnalyzer, DateField, \
-    SimpleDateFormat
+    Document, Field, IndexWriter, StandardAnalyzer, NumericField, \
+    SimpleDateFormat, Version, SimpleFSDirectory, File, DateTools, DateField
 
 # date culled from LuceneInAction.zip archive from Manning site
 samplesModified = SimpleDateFormat('yyyy-MM-dd').parse('2004-12-02')
@@ -26,7 +26,10 @@
 
     def createIndex(cls, dataDir, indexDir, useCompound):
 
-        writer = IndexWriter(indexDir, StandardAnalyzer(), True)
+        indexDir = SimpleFSDirectory(File(indexDir))
+        writer = IndexWriter(indexDir,
+                             StandardAnalyzer(Version.LUCENE_CURRENT), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
         writer.setUseCompoundFile(useCompound)
 
         for dir, dirnames, filenames in os.walk(dataDir):
@@ -70,32 +73,45 @@
         print "---------"
 
         doc.add(Field("isbn", isbn,
-                      Field.Store.YES, Field.Index.UN_TOKENIZED))
+                      Field.Store.YES, Field.Index.NOT_ANALYZED))
         doc.add(Field("category", category,
-                      Field.Store.YES, Field.Index.UN_TOKENIZED))
+                      Field.Store.YES, Field.Index.NOT_ANALYZED))
         doc.add(Field("title", title,
-                      Field.Store.YES, Field.Index.TOKENIZED))
+                      Field.Store.YES, Field.Index.ANALYZED,
+                      Field.TermVector.WITH_POSITIONS_OFFSETS))
+        doc.add(Field("title2", title.lower(),
+                      Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS,
+                      Field.TermVector.WITH_POSITIONS_OFFSETS))
 
         # split multiple authors into unique field instances
         authors = author.split(',')
         for a in authors:
             doc.add(Field("author", a,
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED,
+                          Field.TermVector.WITH_POSITIONS_OFFSETS))
 
         doc.add(Field("url", url,
-                      Field.Store.YES, Field.Index.NO))
+                      Field.Store.YES,
+                      Field.Index.NOT_ANALYZED_NO_NORMS))
         doc.add(Field("subject", subject,
-                      Field.Store.NO, Field.Index.TOKENIZED,
-                      Field.TermVector.YES))
-        doc.add(Field("pubmonth", pubmonth,
-                      Field.Store.YES, Field.Index.UN_TOKENIZED))
-        doc.add(Field("contents", ' '.join([title, subject, author]),
-                      Field.Store.NO, Field.Index.TOKENIZED))
+                      Field.Store.NO, Field.Index.ANALYZED,
+                      Field.TermVector.WITH_POSITIONS_OFFSETS))
+        doc.add(NumericField("pubmonth",
+                             Field.Store.YES,
+                             True).setIntValue(int(pubmonth)))
+
+        d = DateTools.stringToDate(pubmonth)
+        d = int(d.getTime() / (1000 * 3600 * 24.0))
+        doc.add(NumericField("pubmonthAsDay").setIntValue(d))
+
+        doc.add(Field("contents", ' '.join([title, subject, author, category]),
+                      Field.Store.NO, Field.Index.ANALYZED,
+                      Field.TermVector.WITH_POSITIONS_OFFSETS))
 
         doc.add(Field("path", path,
-                      Field.Store.YES, Field.Index.UN_TOKENIZED))
+                      Field.Store.YES, Field.Index.NOT_ANALYZED))
         doc.add(Field("modified", DateField.dateToString(samplesModified),
-                      Field.Store.YES, Field.Index.UN_TOKENIZED))
+                      Field.Store.YES, Field.Index.NOT_ANALYZED))
 
         writer.addDocument(doc)
 

Added: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/BookLinkCollector.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/BookLinkCollector.py?rev=883975&amp;view=auto
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/BookLinkCollector.py (added)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/BookLinkCollector.py Wed Nov 25 04:08:13 2009
@@ -0,0 +1,49 @@
+# ====================================================================
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+# ====================================================================
+
+from lucene import Document, IndexSearcher, PythonCollector, FieldCache
+
+#
+# A Collector extension
+#
+
+class BookLinkCollector(PythonCollector):
+
+    def __init__(self, searcher):
+        super(BookLinkCollector, self).__init__()
+
+        self.searcher = searcher
+        self.documents = {}
+
+    def acceptsDocsOutOfOrder(self):
+
+        return True
+
+    def setNextReader(self, reader, docBase):
+
+        self.docBase = docBase
+        self.urls = FieldCache.DEFAULT.getStrings(reader, "url")
+        self.titles = FieldCache.DEFAULT.getStrings(reader, "title2")
+
+    def collect(self, docID, score):
+
+        url = self.urls[docID]
+        title = self.titles[docID]
+        self.documents[url] = title
+
+        print "%s: %s" %(title, score)
+
+    def getLinks(self):
+
+        return self.documents.copy()

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/BookLinkCollector.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/BookLinkCollector.py
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/CollectorTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/CollectorTest.py?rev=883975&amp;view=auto
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/CollectorTest.py (added)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/CollectorTest.py Wed Nov 25 04:08:13 2009
@@ -0,0 +1,37 @@
+# ====================================================================
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+# ====================================================================
+
+from lia.common.LiaTestCase import LiaTestCase
+from lia.extsearch.collector.BookLinkCollector import BookLinkCollector
+
+from lucene import IndexSearcher, TermQuery, Term
+
+class CollectorTest(LiaTestCase):
+
+    def testCollecting(self):
+
+        query = TermQuery(Term("contents", "junit"))
+        searcher = IndexSearcher(self.directory, True)
+
+        collector = BookLinkCollector(searcher)
+        searcher.search(query, collector)
+
+        links = collector.getLinks()
+        self.assertEqual("java development with ant",
+                         links["http://www.manning.com/antbook"])
+
+        scoreDocs = searcher.search(query, 10).scoreDocs
+        self.dumpHits(searcher, scoreDocs)
+
+        searcher.close()

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/CollectorTest.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/CollectorTest.py
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/__init__.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/__init__.py?rev=883975&amp;view=auto
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/__init__.py (added)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/__init__.py Wed Nov 25 04:08:13 2009
@@ -0,0 +1 @@
+# collector package

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/__init__.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/__init__.py
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilter.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilter.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilter.py Wed Nov 25 04:08:13 2009
@@ -12,7 +12,8 @@
 #   limitations under the License.
 # ====================================================================
 
-from lucene import IndexReader, Term, BitSet, PythonFilter, JArray
+from lucene import \
+    IndexReader, Term, BitSet, PythonFilter, JArray, OpenBitSet
 
 #
 # A Filter extension, with a TermDocs wrapper working around the lack of
@@ -25,18 +26,20 @@
         super(SpecialsFilter, self).__init__()
         self.accessor = accessor
 
-    def bits(self, reader):
+    def getDocIdSet(self, reader):
 
-        bits = BitSet(reader.maxDoc())
+        bits = OpenBitSet(long(reader.maxDoc()))
         isbns = self.accessor.isbns()
 
+        docs = JArray(int)(1)
+        freqs = JArray(int)(1)
+
         for isbn in isbns:
             if isbn is not None:
                 termDocs = reader.termDocs(Term("isbn", isbn))
-                docs = JArray(int)(1)
-                freq = JArray(int)(1)
-                if termDocs.read(docs, freq) == 1:
-                    bits.set(docs[0])
+                count = termDocs.read(docs, freqs)
+                if count == 1:
+                    bits.set(long(docs[0]))
 
         return bits
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilterTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilterTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilterTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilterTest.py Wed Nov 25 04:08:13 2009
@@ -13,12 +13,12 @@
 # ====================================================================
 
 from lia.common.LiaTestCase import LiaTestCase
-from lia.extsearch.filters.MockSpecialsAccessor import MockSpecialsAccessor
+from lia.extsearch.filters.TestSpecialsAccessor import TestSpecialsAccessor
 from lia.extsearch.filters.SpecialsFilter import SpecialsFilter
 
 from lucene import \
-     WildcardQuery, FilteredQuery, TermQuery, BooleanQuery, RangeQuery, \
-     IndexSearcher, Term, BooleanClause
+     WildcardQuery, FilteredQuery, TermQuery, BooleanQuery, TermRangeQuery, \
+     IndexSearcher, Term, BooleanClause, MatchAllDocsQuery
 
 
 class SpecialsFilterTest(LiaTestCase):
@@ -27,24 +27,23 @@
 
         super(SpecialsFilterTest, self).setUp()
 
-        self.allBooks = RangeQuery(Term("pubmonth", "190001"),
-                                   Term("pubmonth", "200512"), True)
-        self.searcher = IndexSearcher(self.directory)
+        self.allBooks = MatchAllDocsQuery()
+        self.searcher = IndexSearcher(self.directory, True)
 
     def testCustomFilter(self):
 
         isbns = ["0060812451", "0465026567"]
-        accessor = MockSpecialsAccessor(isbns)
+        accessor = TestSpecialsAccessor(isbns)
         
         filter = SpecialsFilter(accessor)
-        hits = self.searcher.search(self.allBooks, filter)
-        self.assertEquals(len(isbns), len(hits), "the specials")
+        topDocs = self.searcher.search(self.allBooks, filter, 50)
+        self.assertEquals(len(isbns), topDocs.totalHits, "the specials")
 
     def testFilteredQuery(self):
         
         isbns = ["0854402624"]  # Steiner
 
-        accessor = MockSpecialsAccessor(isbns)
+        accessor = TestSpecialsAccessor(isbns)
         filter = SpecialsFilter(accessor)
 
         educationBooks = WildcardQuery(Term("category", "*education*"))
@@ -56,6 +55,6 @@
         logoOrEdBooks.add(logoBooks, BooleanClause.Occur.SHOULD)
         logoOrEdBooks.add(edBooksOnSpecial, BooleanClause.Occur.SHOULD)
 
-        hits = self.searcher.search(logoOrEdBooks)
+        topDocs = self.searcher.search(logoOrEdBooks, 50)
         print logoOrEdBooks
-        self.assertEqual(2, len(hits), "Papert and Steiner")
+        self.assertEqual(2, topDocs.totalHits, "Papert and Steiner")

Copied: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/TestSpecialsAccessor.py (from r820102, lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/MockSpecialsAccessor.py)
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/TestSpecialsAccessor.py?p2=lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/TestSpecialsAccessor.py&amp;p1=lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/MockSpecialsAccessor.py&amp;r1=820102&amp;r2=883975&amp;rev=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/MockSpecialsAccessor.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/TestSpecialsAccessor.py Wed Nov 25 04:08:13 2009
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-class MockSpecialsAccessor(object):
+class TestSpecialsAccessor(object):
 
     def __init__(self, isbns):
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/AdvancedQueryParserTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/AdvancedQueryParserTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/AdvancedQueryParserTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/AdvancedQueryParserTest.py Wed Nov 25 04:08:13 2009
@@ -30,12 +30,13 @@
         self.analyzer = WhitespaceAnalyzer()
         self.directory = RAMDirectory()
 
-        writer = IndexWriter(self.directory, self.analyzer, True)
+        writer = IndexWriter(self.directory, self.analyzer, True, 
+                             IndexWriter.MaxFieldLength.LIMITED)
 
         for i in xrange(1, 501):
             doc = Document()
             doc.add(Field("id", NumberUtils.pad(i),
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             writer.addDocument(doc)
 
         writer.close()
@@ -84,9 +85,9 @@
         self.assertEqual("id:[0000000037 TO 0000000346]",
                          query.toString("field"), "padded")
 
-        searcher = IndexSearcher(self.directory)
-        hits = searcher.search(query)
-        self.assertEqual(310, hits.length())
+        searcher = IndexSearcher(self.directory, True)
+        scoreDocs = searcher.search(query, 1000).scoreDocs
+        self.assertEqual(310, len(scoreDocs))
 
         print parser.parse("special:[term TO *]")
         print parser.parse("special:[* TO term]")

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/CustomQueryParser.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/CustomQueryParser.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/CustomQueryParser.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/CustomQueryParser.py Wed Nov 25 04:08:13 2009
@@ -14,8 +14,8 @@
 
 from lucene import \
     PythonQueryParser, PythonMultiFieldQueryParser, \
-    PhraseQuery, RangeQuery, SpanNearQuery, SpanTermQuery, \
-    Term, PhraseQuery
+    PhraseQuery, TermRangeQuery, SpanNearQuery, SpanTermQuery, \
+    Term, PhraseQuery, Version
 
 from lia.extsearch.queryparser.NumberUtils import NumberUtils
 
@@ -26,7 +26,7 @@
 class CustomQueryParser(PythonQueryParser):
 
     def __init__(self, field, analyzer):
-        super(CustomQueryParser, self).__init__(field, analyzer)
+        super(CustomQueryParser, self).__init__(Version.LUCENE_CURRENT, field, analyzer)
 
     def getFuzzyQuery(self, field, termText, minSimilarity):
         raise AssertionError, "Fuzzy queries not allowed"
@@ -45,24 +45,15 @@
             num1 = int(part1)
             num2 = int(part2)
 
-            return RangeQuery(Term(field, NumberUtils.pad(num1)),
-                              Term(field, NumberUtils.pad(num2)),
-                              inclusive)
+            return TermRangeQuery(field,
+                                  NumberUtils.pad(num1),
+                                  NumberUtils.pad(num2),
+                                  inclusive, True)
 
         if field == "special":
             print part1, "-&gt;", part2
 
-            if part1 == '*':
-                t1 = None
-            else:
-                t1 = Term("field", part1)
-
-            if part2 == '*':
-                t2 = None
-            else:
-                t2 = Term("field", part2)
-
-            return RangeQuery(t1, t2, inclusive)
+            return TermRangeQuery("field", part1, part2, inclusive, True)
 
         return super(CustomQueryParser,
                      self).getRangeQuery(field, part1, part2, inclusive)
@@ -94,7 +85,7 @@
 class MultiFieldCustomQueryParser(PythonMultiFieldQueryParser):
 
     def __init__(self, fields, analyzer):
-        super(MultiFieldCustomQueryParser, self).__init__(fields, analyzer)
+        super(MultiFieldCustomQueryParser, self).__init__(Version.LUCENE_CURRENT, fields, analyzer)
 
     def getFuzzyQuery(self, super, field, termText, minSimilarity):
         raise AssertionError, "Fuzzy queries not allowed"
@@ -113,24 +104,15 @@
             num1 = int(part1)
             num2 = int(part2)
 
-            return RangeQuery(Term(field, NumberUtils.pad(num1)),
-                              Term(field, NumberUtils.pad(num2)),
-                              inclusive)
+            return TermRangeQuery(field,
+                                  NumberUtils.pad(num1),
+                                  NumberUtils.pad(num2),
+                                  inclusive, True)
 
         if field == "special":
             print part1, "-&gt;", part2
 
-            if part1 == '*':
-                t1 = None
-            else:
-                t1 = Term("field", part1)
-
-            if part2 == '*':
-                t2 = None
-            else:
-                t2 = Term("field", part2)
-
-            return RangeQuery(t1, t2, inclusive)
+            return TermRangeQuery("field", part1, part2, inclusive, True)
 
         return super(CustomQueryParser,
                      self).getRangeQuery(field, part1, part2, inclusive)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceComparatorSource.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceComparatorSource.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceComparatorSource.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceComparatorSource.py Wed Nov 25 04:08:13 2009
@@ -13,75 +13,78 @@
 # ====================================================================
 
 from math import sqrt
-from lucene import SortField, Term, IndexReader, \
-    PythonSortComparatorSource, PythonScoreDocComparator, Double
+from lucene import SortField, Term, IndexReader, FieldCache, \
+    PythonFieldComparatorSource, PythonFieldComparator, Double
 
 #
-# A SortComparatorSource implementation
+# A FieldComparatorSource implementation
 #
 
-class DistanceComparatorSource(PythonSortComparatorSource):
+class DistanceComparatorSource(PythonFieldComparatorSource):
 
     def __init__(self, x, y):
         super(DistanceComparatorSource, self).__init__()
+
         self.x = x
         self.y = y
 
-    def newComparator(self, reader, fieldName):
+    def newComparator(self, fieldName, numHits, sortPos, reversed):
+
+        class DistanceScoreDocLookupComparator(PythonFieldComparator):
+
+            def __init__(_self, fieldName, numHits):
+                super(DistanceScoreDocLookupComparator, _self).__init__()
+                _self.values = [0.0] * numHits
+                _self.fieldName = fieldName
+
+            def setNextReader(_self, reader, docBase):
+      
+                _self.xDoc = FieldCache.DEFAULT.getInts(reader, "x")
+                _self.yDoc = FieldCache.DEFAULT.getInts(reader, "y")
 
-        #
-        # A ScoreDocComparator implementation
-        # 
-        class DistanceScoreDocLookupComparator(PythonScoreDocComparator):
-
-            def __init__(self, reader, fieldName, x, y):
-                super(DistanceScoreDocLookupComparator, self).__init__()
-                enumerator = reader.terms(Term(fieldName, ""))
-                self.distances = distances = [0.0] * reader.numDocs()
-
-                if reader.numDocs() &gt; 0:
-                    termDocs = reader.termDocs()
-                    try:
-                        while True:
-                            term = enumerator.term()
-                            if term is None:
-                                raise RuntimeError, "no terms in field %s" %(fieldName)
-                            if term.field() != fieldName:
-                                break
-                            
-                            termDocs.seek(enumerator)
-                            while termDocs.next():
-                                xy = term.text().split(',')
-                                deltax = int(xy[0]) - x
-                                deltay = int(xy[1]) - y
-
-                                distances[termDocs.doc()] = sqrt(deltax ** 2 +
-                                                                 deltay ** 2)
-            
-                            if not enumerator.next():
-                                break
-                    finally:
-                        termDocs.close()
+            def _getDistance(_self, doc):
 
-            def compare(self, i, j):
+                deltax = _self.xDoc[doc] - self.x
+                deltay = _self.yDoc[doc] - self.y
 
-                if self.distances[i.doc] &lt; self.distances[j.doc]:
+                return sqrt(deltax * deltax + deltay * deltay)
+
+            def compare(_self, slot1, slot2):
+
+                if _self.values[slot1] &lt; _self.values[slot2]:
                     return -1
-                if self.distances[i.doc] &gt; self.distances[j.doc]:
+                if _self.values[slot1] &gt; _self.values[slot2]:
                     return 1
+
                 return 0
 
-            def sortValue(self, i):
+            def setBottom(_self, slot):
+
+                _self._bottom = _self.values[slot]
+
+            def compareBottom(_self, doc):
+
+                docDistance = _self._getDistance(doc)
+                if _self._bottom &lt; docDistance:
+                    return -1
+                if _self._bottom &gt; docDistance:
+                     return 1
+
+                return 0
+
+            def copy(_self, slot, doc):
+
+                _self.values[slot] = _self._getDistance(doc)
 
-                return Double(self.distances[i.doc])
+            def value(_self, slot):
 
-            def sortType(self):
+                return Double(_self.values[slot])
 
-                return SortField.FLOAT
+            def sortType(_self):
+                return SortField.CUSTOM
 
-        return DistanceScoreDocLookupComparator(reader, fieldName,
-                                                self.x, self.y)
+        return DistanceScoreDocLookupComparator(fieldName, numHits)
 
     def __str__(self):
 
-        return "Distance from ("+x+","+y+")"
+        return "Distance from (" + self.x + "," + self.y + ")"

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceSortingTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceSortingTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceSortingTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceSortingTest.py Wed Nov 25 04:08:13 2009
@@ -28,7 +28,8 @@
     def setUp(self):
 
         self.directory = RAMDirectory()
-        writer = IndexWriter(self.directory, WhitespaceAnalyzer(), True)
+        writer = IndexWriter(self.directory, WhitespaceAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
 
         self.addPoint(writer, "El Charro", "restaurant", 1, 2)
         self.addPoint(writer, "Cafe Poca Cosa", "restaurant", 5, 9)
@@ -37,25 +38,28 @@
 
         writer.close()
 
-        self.searcher = IndexSearcher(self.directory)
+        self.searcher = IndexSearcher(self.directory, True)
         self.query = TermQuery(Term("type", "restaurant"))
 
     def addPoint(self, writer, name, type, x, y):
 
         doc = Document()
-        doc.add(Field("name", name, Field.Store.YES, Field.Index.UN_TOKENIZED))
-        doc.add(Field("type", type, Field.Store.YES, Field.Index.UN_TOKENIZED))
-        doc.add(Field("location", "%d,%d" %(x, y),
-                      Field.Store.YES, Field.Index.UN_TOKENIZED))
+        doc.add(Field("name", name, Field.Store.YES, Field.Index.NOT_ANALYZED))
+        doc.add(Field("type", type, Field.Store.YES, Field.Index.NOT_ANALYZED))
+        doc.add(Field("x", str(x), Field.Store.YES,
+                      Field.Index.NOT_ANALYZED_NO_NORMS))
+        doc.add(Field("y", str(y), Field.Store.YES,
+                      Field.Index.NOT_ANALYZED_NO_NORMS));
+
         writer.addDocument(doc)
 
     def testNearestRestaurantToHome(self):
 
         sort = Sort(SortField("location", DistanceComparatorSource(0, 0)))
 
-        hits = self.searcher.search(self.query, sort)
-        self.assertEqual("El Charro", hits.doc(0).get("name"), "closest")
-        self.assertEqual("Los Betos", hits.doc(3).get("name"), "furthest")
+        scoreDocs = self.searcher.search(self.query, None, 50, sort).scoreDocs
+        self.assertEqual("El Charro", self.searcher.doc(scoreDocs[0].doc).get("name"), "closest")
+        self.assertEqual("Los Betos", self.searcher.doc(scoreDocs[3].doc).get("name"), "furthest")
 
     def testNeareastRestaurantToWork(self):
 
@@ -67,8 +71,9 @@
 
         fieldDoc = FieldDoc.cast_(docs.scoreDocs[0])
         distance = Double.cast_(fieldDoc.fields[0]).doubleValue()
+
         self.assertEqual(sqrt(17), distance,
-                     "(10,10) -&gt; (9,6) = sqrt(17)")
+                         "(10,10) -&gt; (9,6) = sqrt(17)")
 
         document = self.searcher.doc(fieldDoc.doc)
         self.assertEqual("Los Betos", document["name"])

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/BaseIndexingTestCase.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/BaseIndexingTestCase.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/BaseIndexingTestCase.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/BaseIndexingTestCase.py Wed Nov 25 04:08:13 2009
@@ -17,11 +17,12 @@
 from unittest import TestCase
 
 from lucene import \
-     FSDirectory, System, \
-     Document, Field, SimpleAnalyzer, IndexWriter, IndexReader
+    SimpleFSDirectory, System, File, \
+    Document, Field, SimpleAnalyzer, IndexWriter, IndexReader
 
 
 class BaseIndexingTestCase(TestCase):
+
     keywords = ["1", "2"]
     unindexed = ["Netherlands", "Italy"]
     unstored = ["Amsterdam has lots of bridges",
@@ -32,24 +33,25 @@
 
         indexDir = os.path.join(System.getProperty('java.io.tmpdir', 'tmp'),
                                 'index-dir')
-        self.dir = FSDirectory.getDirectory(indexDir, True)
+        self.dir = SimpleFSDirectory(File(indexDir))
         self.addDocuments(self.dir)
 
     def addDocuments(self, dir):
 
-        writer = IndexWriter(dir, self.getAnalyzer(), True)
+        writer = IndexWriter(dir, self.getAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
         writer.setUseCompoundFile(self.isCompound())
 
         for i in xrange(len(self.keywords)):
             doc = Document()
             doc.add(Field("id", self.keywords[i],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("country", self.unindexed[i],
                           Field.Store.YES, Field.Index.NO))
             doc.add(Field("contents", self.unstored[i],
-                          Field.Store.NO, Field.Index.TOKENIZED))
+                          Field.Store.NO, Field.Index.ANALYZED))
             doc.add(Field("city", self.text[i],
-                          Field.Store.YES, Field.Index.TOKENIZED))
+                          Field.Store.YES, Field.Index.ANALYZED))
             writer.addDocument(doc)
 
         writer.optimize()
@@ -65,13 +67,14 @@
 
     def testIndexWriter(self):
 
-        writer = IndexWriter(self.dir, self.getAnalyzer(), False)
-        self.assertEqual(len(self.keywords), writer.docCount())
+        writer = IndexWriter(self.dir, self.getAnalyzer(), False,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
+        self.assertEqual(len(self.keywords), writer.numDocs())
         writer.close()
 
     def testIndexReader(self):
 
-        reader = IndexReader.open(self.dir)
+        reader = IndexReader.open(self.dir, True)
         self.assertEqual(len(self.keywords), reader.maxDoc())
         self.assertEqual(len(self.keywords), reader.numDocs())
         reader.close()

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/CompoundVersusMultiFileIndexTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/CompoundVersusMultiFileIndexTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/CompoundVersusMultiFileIndexTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/CompoundVersusMultiFileIndexTest.py Wed Nov 25 04:08:13 2009
@@ -19,7 +19,8 @@
 from datetime import timedelta
 
 from lucene import \
-     IndexWriter, SimpleAnalyzer, FSDirectory, System, Document, Field
+     IndexWriter, SimpleAnalyzer, SimpleFSDirectory, Document, Field, \
+     System, File
 
 
 class CompoundVersusMultiFileIndexTest(TestCase):
@@ -39,8 +40,8 @@
         self.rmdir(cIndexDir)
         self.rmdir(mIndexDir)
 
-        self.cDir = FSDirectory.getDirectory(cIndexDir, True)
-        self.mDir = FSDirectory.getDirectory(mIndexDir, True)
+        self.cDir = SimpleFSDirectory(File(cIndexDir))
+        self.mDir = SimpleFSDirectory(File(mIndexDir))
 
     def rmdir(self, dir):
 
@@ -69,7 +70,8 @@
 
     def addDocuments(self, dir, isCompound):
 
-        writer = IndexWriter(dir, SimpleAnalyzer(), True)
+        writer = IndexWriter(dir, SimpleAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.LIMITED)
         writer.setUseCompoundFile(isCompound)
 
         # change to adjust performance of indexing with FSDirectory
@@ -80,13 +82,13 @@
         for word in self.docs:
             doc = Document()
             doc.add(Field("keyword", word,
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("unindexed", word,
                           Field.Store.YES, Field.Index.NO))
             doc.add(Field("unstored", word,
-                          Field.Store.NO, Field.Index.TOKENIZED))
+                          Field.Store.NO, Field.Index.ANALYZED))
             doc.add(Field("text", word,
-                          Field.Store.YES, Field.Index.TOKENIZED))
+                          Field.Store.YES, Field.Index.ANALYZED))
             writer.addDocument(doc)
 
         writer.optimize()

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentDeleteTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentDeleteTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentDeleteTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentDeleteTest.py Wed Nov 25 04:08:13 2009
@@ -20,7 +20,7 @@
 
     def testDeleteBeforeIndexMerge(self):
 
-        reader = IndexReader.open(self.dir)
+        reader = IndexReader.open(self.dir, False)
         self.assertEqual(2, reader.maxDoc())
         self.assertEqual(2, reader.numDocs())
         reader.deleteDocument(1)
@@ -32,7 +32,7 @@
 
         reader.close()
 
-        reader = IndexReader.open(self.dir)
+        reader = IndexReader.open(self.dir, True)
 
         self.assertEqual(2, reader.maxDoc())
         self.assertEqual(1, reader.numDocs())
@@ -41,17 +41,18 @@
 
     def testDeleteAfterIndexMerge(self):
 
-        reader = IndexReader.open(self.dir)
+        reader = IndexReader.open(self.dir, False)
         self.assertEqual(2, reader.maxDoc())
         self.assertEqual(2, reader.numDocs())
         reader.deleteDocument(1)
         reader.close()
 
-        writer = IndexWriter(self.dir, self.getAnalyzer(), False)
+        writer = IndexWriter(self.dir, self.getAnalyzer(), False,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
         writer.optimize()
         writer.close()
 
-        reader = IndexReader.open(self.dir)
+        reader = IndexReader.open(self.dir, True)
 
         self.assert_(not reader.isDeleted(1))
         self.assert_(not reader.hasDeletions())

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentUpdateTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentUpdateTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentUpdateTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentUpdateTest.py Wed Nov 25 04:08:13 2009
@@ -25,19 +25,20 @@
 
         self.assertEqual(1, self.getHitCount("city", "Amsterdam"))
 
-        reader = IndexReader.open(self.dir)
+        reader = IndexReader.open(self.dir, False)
         reader.deleteDocuments(Term("city", "Amsterdam"))
         reader.close()
 
-        writer = IndexWriter(self.dir, self.getAnalyzer(), False)
+        writer = IndexWriter(self.dir, self.getAnalyzer(), False,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
         doc = Document()
-        doc.add(Field("id", "1", Field.Store.YES, Field.Index.UN_TOKENIZED))
+        doc.add(Field("id", "1", Field.Store.YES, Field.Index.NOT_ANALYZED))
         doc.add(Field("country", "Russia",
                       Field.Store.YES, Field.Index.NO))
         doc.add(Field("contents", "St. Petersburg has lots of bridges",
-                      Field.Store.NO, Field.Index.TOKENIZED))
+                      Field.Store.NO, Field.Index.ANALYZED))
         doc.add(Field("city", "St. Petersburg",
-                      Field.Store.YES, Field.Index.TOKENIZED))
+                      Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(doc)
         writer.optimize()
         writer.close()
@@ -50,14 +51,12 @@
 
         return WhitespaceAnalyzer()
 
-
     def getHitCount(self, fieldName, searchString):
 
-        searcher = IndexSearcher(self.dir)
+        searcher = IndexSearcher(self.dir, True)
         t = Term(fieldName, searchString)
         query = TermQuery(t)
-        hits = searcher.search(query)
-        hitCount = hits.length()
+        hitCount = len(searcher.search(query, 50).scoreDocs)
         searcher.close()
 
         return hitCount

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FS2RAMDirectoryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FS2RAMDirectoryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FS2RAMDirectoryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FS2RAMDirectoryTest.py Wed Nov 25 04:08:13 2009
@@ -22,12 +22,12 @@
 
     def testSlurp(self):
 
-        fsDirReader = IndexReader.open(self.dir)
+        fsDirReader = IndexReader.open(self.dir, True)
         self.assertEqual(len(self.keywords), fsDirReader.maxDoc())
         self.assertEqual(len(self.keywords), fsDirReader.numDocs())
 
         ramDir = RAMDirectory(self.dir)
-        ramDirReader = IndexReader.open(ramDir)
+        ramDirReader = IndexReader.open(ramDir, True)
         self.assertEqual(fsDirReader.maxDoc(), ramDirReader.maxDoc())
         self.assertEqual(fsDirReader.numDocs(), ramDirReader.numDocs())
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FSversusRAMDirectoryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FSversusRAMDirectoryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FSversusRAMDirectoryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FSversusRAMDirectoryTest.py Wed Nov 25 04:08:13 2009
@@ -19,8 +19,8 @@
 from datetime import timedelta
 
 from lucene import \
-     IndexWriter, SimpleAnalyzer, Document, Field, System, \
-     FSDirectory, RAMDirectory
+     IndexWriter, SimpleAnalyzer, Document, Field, System, File, \
+     SimpleFSDirectory, RAMDirectory
 
 
 class FSversusRAMDirectoryTest(TestCase):
@@ -35,7 +35,7 @@
         fsIndexDir = os.path.join(System.getProperty("java.io.tmpdir", "tmp"),
                                   "fs-index")
         self.ramDir = RAMDirectory()
-        self.fsDir = FSDirectory.getDirectory(fsIndexDir, True)
+        self.fsDir = SimpleFSDirectory(File(fsIndexDir))
 
     def testTiming(self):
 
@@ -56,7 +56,8 @@
 
     def addDocuments(self, dir):
 
-        writer = IndexWriter(dir, SimpleAnalyzer(), True)
+        writer = IndexWriter(dir, SimpleAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
 
         #
         # change to adjust performance of indexing with FSDirectory
@@ -68,13 +69,13 @@
         for word in self.docs:
             doc = Document()
             doc.add(Field("keyword", word,
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
             doc.add(Field("unindexed", word,
                           Field.Store.YES, Field.Index.NO))
             doc.add(Field("unstored", word,
-                          Field.Store.NO, Field.Index.TOKENIZED))
+                          Field.Store.NO, Field.Index.ANALYZED))
             doc.add(Field("text", word,
-                          Field.Store.YES, Field.Index.TOKENIZED))
+                          Field.Store.YES, Field.Index.ANALYZED))
             writer.addDocument(doc)
 
         writer.optimize()

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FieldLengthTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FieldLengthTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FieldLengthTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FieldLengthTest.py Wed Nov 25 04:08:13 2009
@@ -14,13 +14,14 @@
 
 import os
 
+from itertools import izip
 from unittest import TestCase
 from time import time
 from datetime import timedelta
 
 from lucene import \
-     IndexWriter, SimpleAnalyzer, Document, Field, System, \
-     Term, TermQuery, IndexSearcher, FSDirectory
+     IndexWriter, SimpleAnalyzer, Document, Field, System, File, \
+     Term, TermQuery, IndexSearcher, SimpleFSDirectory
 
 
 class FieldLengthTest(TestCase):
@@ -35,7 +36,7 @@
 
         indexDir = os.path.join(System.getProperty("java.io.tmpdir", "tmp"),
                                 "index-dir")
-        self.dir = FSDirectory.getDirectory(indexDir, True)
+        self.dir = SimpleFSDirectory(File(indexDir))
 
     def testFieldSize(self):
 
@@ -47,30 +48,30 @@
 
     def getHitCount(self, fieldName, searchString):
 
-        searcher = IndexSearcher(self.dir)
+        searcher = IndexSearcher(self.dir, True)
         t = Term(fieldName, searchString)
         query = TermQuery(t)
-        hits = searcher.search(query)
-        hitCount = hits.length()
+        hitCount = len(searcher.search(query, 50).scoreDocs)
         searcher.close()
 
         return hitCount
 
     def addDocuments(self, dir, maxFieldLength):
 
-        writer = IndexWriter(dir, SimpleAnalyzer(), True)
-        writer.setMaxFieldLength(maxFieldLength)
+        writer = IndexWriter(dir, SimpleAnalyzer(), True,
+                             IndexWriter.MaxFieldLength(maxFieldLength))
         
-        for i in xrange(len(self.keywords)):
+        for keyword, unindexed, unstored, text in \
+                izip(self.keywords, self.unindexed, self.unstored, self.text):
             doc = Document()
-            doc.add(Field("id", self.keywords[i],
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
-            doc.add(Field("country", self.unindexed[i],
+            doc.add(Field("id", keyword,
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
+            doc.add(Field("country", unindexed,
                           Field.Store.YES, Field.Index.NO))
-            doc.add(Field("contents", self.unstored[i],
-                          Field.Store.NO, Field.Index.TOKENIZED))
-            doc.add(Field("city", self.text[i],
-                          Field.Store.YES, Field.Index.TOKENIZED))
+            doc.add(Field("contents", unstored,
+                          Field.Store.NO, Field.Index.ANALYZED))
+            doc.add(Field("city", text,
+                          Field.Store.YES, Field.Index.ANALYZED))
             writer.addDocument(doc)
 
         writer.optimize()

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/LockTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/LockTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/LockTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/LockTest.py Wed Nov 25 04:08:13 2009
@@ -17,7 +17,7 @@
 from unittest import TestCase
 
 from lucene import VERSION, \
-     IndexWriter, IndexReader, SimpleAnalyzer, FSDirectory, System
+     IndexWriter, IndexReader, SimpleAnalyzer, SimpleFSDirectory, System, File
 
 
 class LockTest(TestCase):
@@ -26,39 +26,22 @@
 
         indexDir = os.path.join(System.getProperty("java.io.tmpdir", "tmp"),
                                 "index")
-        self.dir = FSDirectory.getDirectory(indexDir, True)
+        self.dir = SimpleFSDirectory(File(indexDir))
 
     def testWriteLock(self):
 
-        if VERSION &lt; '2.1.0':
-            writer1 = None
-            writer2 = None
-            gotException = False
-
-            try:
-                try:
-                    writer1 = IndexWriter(self.dir, SimpleAnalyzer(), True)
-                    writer2 = IndexWriter(self.dir, SimpleAnalyzer(), True)
-
-                    self.fail("We should never reach this point")
-                except:
-                    gotException = True
-            finally:
-                writer1.close()
-                self.assert_(writer2 is None)
-                self.assert_(gotException)
-
-    def testCommitLock(self):
-
-        reader1 = None
-        reader2 = None
+        writer1 = IndexWriter(self.dir, SimpleAnalyzer(),
+                              IndexWriter.MaxFieldLength.UNLIMITED)
+        writer2 = None
 
         try:
-            writer = IndexWriter(self.dir, SimpleAnalyzer(), True)
-            writer.close()
-
-            reader1 = IndexReader.open(self.dir)
-            reader2 = IndexReader.open(self.dir)
+            try:
+                writer2 = IndexWriter(self.dir, SimpleAnalyzer(),
+                                      IndexWriter.MaxFieldLength.UNLIMITED)
+                self.fail("We should never reach this point")
+            except:
+                pass
         finally:
-            reader1.close()
-            reader2.close()
+            IndexWriter.unlock(self.dir)
+            writer1.close()
+            self.assert_(writer2 is None)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BasicSearchingTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BasicSearchingTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BasicSearchingTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BasicSearchingTest.py Wed Nov 25 04:08:13 2009
@@ -15,44 +15,46 @@
 from lia.common.LiaTestCase import LiaTestCase
 
 from lucene import \
-     SimpleAnalyzer, Document, TermQuery, QueryParser, IndexSearcher, Term
+    SimpleAnalyzer, Document, TermQuery, QueryParser, IndexSearcher, Term, \
+    Version
 
 
 class BasicSearchingTest(LiaTestCase):
 
     def testTerm(self):
 
-        searcher = IndexSearcher(self.directory)
+        searcher = IndexSearcher(self.directory, True)
         t = Term("subject", "ant")
         query = TermQuery(t)
-        hits = searcher.search(query)
-        self.assertEqual(1, hits.length(), "JDwA")
+        scoreDocs = searcher.search(query, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs), "JDwA")
 
         t = Term("subject", "junit")
-        hits = searcher.search(TermQuery(t))
-        self.assertEqual(2, hits.length())
+        scoreDocs = searcher.search(TermQuery(t), 50).scoreDocs
+        self.assertEqual(2, len(scoreDocs))
 
         searcher.close()
 
     def testKeyword(self):
 
-        searcher = IndexSearcher(self.directory)
+        searcher = IndexSearcher(self.directory, True)
         t = Term("isbn", "1930110995")
         query = TermQuery(t)
-        hits = searcher.search(query)
-        self.assertEqual(1, hits.length(), "JUnit in Action")
+        scoreDocs = searcher.search(query, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs), "JUnit in Action")
 
     def testQueryParser(self):
 
-        searcher = IndexSearcher(self.directory)
+        searcher = IndexSearcher(self.directory, True)
 
-        query = QueryParser("contents",
+        query = QueryParser(Version.LUCENE_CURRENT, "contents",
                             SimpleAnalyzer()).parse("+JUNIT +ANT -MOCK")
-        hits = searcher.search(query)
-        self.assertEqual(1, hits.length())
-        d = hits.doc(0)
+        scoreDocs = searcher.search(query, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs))
+        d = searcher.doc(scoreDocs[0].doc)
         self.assertEqual("Java Development with Ant", d.get("title"))
 
-        query = QueryParser("contents", SimpleAnalyzer()).parse("mock OR junit")
-        hits = searcher.search(query)
-        self.assertEqual(2, hits.length(), "JDwA and JIA")
+        query = QueryParser(Version.LUCENE_CURRENT, "contents",
+                            SimpleAnalyzer()).parse("mock OR junit")
+        scoreDocs = searcher.search(query, 50).scoreDocs
+        self.assertEqual(2, len(scoreDocs), "JDwA and JIA")

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BooleanQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BooleanQueryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BooleanQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BooleanQueryTest.py Wed Nov 25 04:08:13 2009
@@ -14,8 +14,9 @@
 
 from lia.common.LiaTestCase import LiaTestCase
 
-from lucene import\
-    Term, BooleanQuery, IndexSearcher, RangeQuery, TermQuery, BooleanClause
+from lucene import Integer, \
+    Term, BooleanQuery, IndexSearcher, \
+    NumericRangeQuery, TermQuery, BooleanClause
 
 
 class BooleanQueryTest(LiaTestCase):
@@ -23,17 +24,19 @@
     def testAnd(self):
 
         searchingBooks = TermQuery(Term("subject", "search"))
-        currentBooks = RangeQuery(Term("pubmonth", "200401"),
-                                  Term("pubmonth", "200412"), True)
+        books2004 = NumericRangeQuery.newIntRange("pubmonth",
+                                                  Integer(200401),
+                                                  Integer(200412),
+                                                  True, True)
+
+        searchingBooks2004 = BooleanQuery()
+        searchingBooks2004.add(searchingBooks, BooleanClause.Occur.MUST)
+        searchingBooks2004.add(books2004, BooleanClause.Occur.MUST)
 
-        currentSearchingBooks = BooleanQuery()
-        currentSearchingBooks.add(searchingBooks, BooleanClause.Occur.MUST)
-        currentSearchingBooks.add(currentBooks, BooleanClause.Occur.MUST)
+        searcher = IndexSearcher(self.directory, True)
+        scoreDocs = searcher.search(searchingBooks2004, 50).scoreDocs
 
-        searcher = IndexSearcher(self.directory)
-        hits = searcher.search(currentSearchingBooks)
-
-        self.assertHitsIncludeTitle(hits, "Lucene in Action")
+        self.assertHitsIncludeTitle(searcher, scoreDocs, "Lucene in Action")
 
     def testOr(self):
 
@@ -46,9 +49,11 @@
         enlightenmentBooks.add(methodologyBooks, BooleanClause.Occur.SHOULD)
         enlightenmentBooks.add(easternPhilosophyBooks, BooleanClause.Occur.SHOULD)
 
-        searcher = IndexSearcher(self.directory)
-        hits = searcher.search(enlightenmentBooks)
+        searcher = IndexSearcher(self.directory, True)
+        scoreDocs = searcher.search(enlightenmentBooks, 50).scoreDocs
         print "or =", enlightenmentBooks
 
-        self.assertHitsIncludeTitle(hits, "Extreme Programming Explained")
-        self.assertHitsIncludeTitle(hits, u"Tao Te Ching \u9053\u5FB7\u7D93")
+        self.assertHitsIncludeTitle(searcher, scoreDocs,
+                                    "Extreme Programming Explained")
+        self.assertHitsIncludeTitle(searcher, scoreDocs,
+                                    u"Tao Te Ching \u9053\u5FB7\u7D93")

Added: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/NumericRangeQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/NumericRangeQueryTest.py?rev=883975&amp;view=auto
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/NumericRangeQueryTest.py (added)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/NumericRangeQueryTest.py Wed Nov 25 04:08:13 2009
@@ -0,0 +1,46 @@
+# ====================================================================
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+# ====================================================================
+
+from lucene import Integer, \
+    IndexSearcher, NumericRangeQuery
+
+from lia.common.LiaTestCase import LiaTestCase
+
+
+class NumericRangeQueryTest(LiaTestCase):
+
+    def testInclusive(self):
+
+        searcher = IndexSearcher(self.directory, True)
+        # pub date of TTC was October 1988
+        query = NumericRangeQuery.newIntRange("pubmonth",
+                                              Integer(198805),
+                                              Integer(198810),
+                                              True, True)
+
+        topDocs = searcher.search(query, 100)
+        self.assertEqual(1, topDocs.totalHits)
+        searcher.close()
+
+    def testExclusive(self):
+
+        searcher = IndexSearcher(self.directory, True)
+        # pub date of TTC was October 1988
+        query = NumericRangeQuery.newIntRange("pubmonth",
+                                              Integer(198805),
+                                              Integer(198810),
+                                              False, False)
+        topDocs = searcher.search(query, 100)
+        self.assertEqual(0, topDocs.totalHits)
+        searcher.close()

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/NumericRangeQueryTest.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/NumericRangeQueryTest.py
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PhraseQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PhraseQueryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PhraseQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PhraseQueryTest.py Wed Nov 25 04:08:13 2009
@@ -25,10 +25,11 @@
 
         # set up sample document
         directory = RAMDirectory()
-        writer = IndexWriter(directory, WhitespaceAnalyzer(), True)
+        writer = IndexWriter(directory, WhitespaceAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
         doc = Document()
         doc.add(Field("field", "the quick brown fox jumped over the lazy dog",
-                       Field.Store.YES, Field.Index.TOKENIZED))
+                       Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(doc)
         writer.close()
 
@@ -42,9 +43,9 @@
         for word in phrase:
             query.add(Term("field", word))
 
-        hits = self.searcher.search(query)
+        topDocs = self.searcher.search(query, 50)
 
-        return len(hits) &gt; 0
+        return topDocs.totalHits &gt; 0
 
     def testSlopComparison(self):
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PrefixQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PrefixQueryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PrefixQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PrefixQueryTest.py Wed Nov 25 04:08:13 2009
@@ -21,17 +21,17 @@
 
     def testPrefix(self):
 
-        searcher = IndexSearcher(self.directory)
+        searcher = IndexSearcher(self.directory, True)
 
         # search for programming books, including subcategories
         term = Term("category", "/technology/computers/programming")
         query = PrefixQuery(term)
 
-        hits = searcher.search(query)
-        programmingAndBelow = hits.length()
+        topDocs = searcher.search(query, 50)
+        programmingAndBelow = topDocs.totalHits
 
         # only programming books, not subcategories
-        hits = searcher.search(TermQuery(term))
-        justProgramming = hits.length()
+        topDocs = searcher.search(TermQuery(term), 50)
+        justProgramming = topDocs.totalHits
 
         self.assert_(programmingAndBelow &gt; justProgramming)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/QueryParserTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/QueryParserTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/QueryParserTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/QueryParserTest.py Wed Nov 25 04:08:13 2009
@@ -17,7 +17,7 @@
 from lucene import \
      WhitespaceAnalyzer, StandardAnalyzer, Term, QueryParser, Locale, \
      BooleanQuery, FuzzyQuery, IndexSearcher, TermRangeQuery, TermQuery, \
-     BooleanClause
+     BooleanClause, Version
 
 
 class QueryParserTest(LiaTestCase):
@@ -26,7 +26,7 @@
 
         super(QueryParserTest, self).setUp()
         self.analyzer = WhitespaceAnalyzer()
-        self.searcher = IndexSearcher(self.directory)
+        self.searcher = IndexSearcher(self.directory, True)
 
     def testToString(self):
 
@@ -41,57 +41,60 @@
 
     def testPrefixQuery(self):
 
-        parser = QueryParser("category", StandardAnalyzer())
+        parser = QueryParser(Version.LUCENE_CURRENT, "category",
+                             StandardAnalyzer(Version.LUCENE_CURRENT))
         parser.setLowercaseExpandedTerms(False)
 
         print parser.parse("/Computers/technology*").toString("category")
 
     def testGrouping(self):
 
-        query = QueryParser("subject", self.analyzer).parse("(agile OR extreme) AND methodology")
-        hits = self.searcher.search(query)
+        query = QueryParser(Version.LUCENE_CURRENT, "subject",
+                            self.analyzer).parse("(agile OR extreme) AND methodology")
+        scoreDocs = self.searcher.search(query, 50).scoreDocs
+
+        self.assertHitsIncludeTitle(self.searcher, scoreDocs,
+                                    "Extreme Programming Explained")
+        self.assertHitsIncludeTitle(self.searcher, scoreDocs,
+                                    "The Pragmatic Programmer")
 
-        self.assertHitsIncludeTitle(hits, "Extreme Programming Explained")
-        self.assertHitsIncludeTitle(hits, "The Pragmatic Programmer")
+    def testTermRangeQuery(self):
 
-    def testRangeQuery(self):
-
-        parser = QueryParser("subject", self.analyzer) 
-        parser.setUseOldRangeQuery(True)
-
-        query = parser.parse("pubmonth:[200401 TO 200412]")
+        query = QueryParser(Version.LUCENE_CURRENT, "subject",
+                            self.analyzer).parse("title2:[K TO N]")
         self.assert_(TermRangeQuery.instance_(query))
 
-        hits = self.searcher.search(query)
-        self.assertHitsIncludeTitle(hits, "Lucene in Action")
+        scoreDocs = self.searcher.search(query, 10).scoreDocs
+        self.assertHitsIncludeTitle(self.searcher, scoreDocs, "Mindstorms")
 
-        query = QueryParser("pubmonth",
-                            self.analyzer).parse("{200201 TO 200208}")
+        query = QueryParser(Version.LUCENE_CURRENT, "subject",
+                            self.analyzer).parse("title2:{K TO Mindstorms}")
+        scoreDocs = self.searcher.search(query, 10).scoreDocs
+        self.assertHitsIncludeTitle(self.searcher, scoreDocs, "Mindstorms",
+                                    True)
 
-        hits = self.searcher.search(query)
-        self.assertEqual(0, hits.length(), "JDwA in 200208")
-  
     def testDateRangeQuery(self):
 
         # locale diff between jre and gcj 1/1/04 -&gt; 01/01/04
         # expression = "modified:[1/1/04 TO 12/31/04]"
         
         expression = "modified:[01/01/04 TO 12/31/04]"
-        parser = QueryParser("subject", self.analyzer)
+        parser = QueryParser(Version.LUCENE_CURRENT, "subject", self.analyzer)
         parser.setLocale(Locale.US)
         query = parser.parse(expression)
         print expression, "parsed to", query
 
-        hits = self.searcher.search(query)
-        self.assert_(hits.length() &gt; 0)
+        topDocs = self.searcher.search(query, 50)
+        self.assert_(topDocs.totalHits &gt; 0)
 
     def testSlop(self):
 
-        q = QueryParser("field", self.analyzer).parse('"exact phrase"')
+        q = QueryParser(Version.LUCENE_CURRENT, "field",
+                        self.analyzer).parse('"exact phrase"')
         self.assertEqual("\"exact phrase\"", q.toString("field"),
                          "zero slop")
 
-        qp = QueryParser("field", self.analyzer)
+        qp = QueryParser(Version.LUCENE_CURRENT, "field", self.analyzer)
         qp.setPhraseSlop(5)
         q = qp.parse('"sloppy phrase"')
         self.assertEqual("\"sloppy phrase\"~5", q.toString("field"),
@@ -99,19 +102,22 @@
 
     def testPhraseQuery(self):
 
-        q = QueryParser("field",
-                        StandardAnalyzer()).parse('"This is Some Phrase*"')
+        analyzer = StandardAnalyzer(Version.LUCENE_24)
+        q = QueryParser(Version.LUCENE_24, "field",
+                        analyzer).parse('"This is Some Phrase*"')
         self.assertEqual("\"some phrase\"", q.toString("field"), "analyzed")
 
-        q = QueryParser("field", self.analyzer).parse('"term"')
+        q = QueryParser(Version.LUCENE_CURRENT, "field",
+                        self.analyzer).parse('"term"')
         self.assert_(TermQuery.instance_(q), "reduced to TermQuery")
 
     def testLowercasing(self):
 
-        q = QueryParser("field", self.analyzer).parse("PrefixQuery*")
+        q = QueryParser(Version.LUCENE_CURRENT, "field",
+                        self.analyzer).parse("PrefixQuery*")
         self.assertEqual("prefixquery*", q.toString("field"), "lowercased")
 
-        qp = QueryParser("field", self.analyzer)
+        qp = QueryParser(Version.LUCENE_CURRENT, "field", self.analyzer)
         qp.setLowercaseExpandedTerms(False)
         q = qp.parse("PrefixQuery*")
         self.assertEqual("PrefixQuery*", q.toString("field"), "not lowercased")
@@ -119,29 +125,25 @@
     def testWildcard(self):
 
         try:
-            QueryParser("field", self.analyzer).parse("*xyz")
+            QueryParser(Version.LUCENE_CURRENT, "field",
+                        self.analyzer).parse("*xyz")
             self.fail("Leading wildcard character should not be allowed")
         except:
             self.assert_(True)
 
     def testBoost(self):
 
-         q = QueryParser("field", self.analyzer).parse("term^2")
+         q = QueryParser(Version.LUCENE_CURRENT, "field",
+                         self.analyzer).parse("term^2")
          self.assertEqual("term^2.0", q.toString("field"))
 
     def testParseException(self):
 
         try:
-            QueryParser("contents", self.analyzer).parse("^&amp;#")
+            QueryParser(Version.LUCENE_CURRENT, "contents",
+                        self.analyzer).parse("^&amp;#")
         except:
             # expression is invalid, as expected
             self.assert_(True)
         else:
             self.fail("ParseException expected, but not thrown")
-
-#  public void testStopWord() throws ParseException {
-#    Query q = QueryParser.parse("the AND drag", "field",
-#        StopAnalyzer())
-#    //  QueryParser fails on the previous line - this is a known 
-#    //  issue
-#  }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r883975 [1/3] - in /lucene/pylucene/trunk: ./ java/org/apache/pylucene/search/ jcc/ samples/LuceneInAction/ samples/LuceneInAction/lia/advsearching/ samples/LuceneInAction/lia/analysis/ samples/LuceneInAction/lia/analysis/i18n/ samples/Luce...</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091125040820.37DBA2388962@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091125040820-37DBA2388962@eris-apache-org%3e</id>
<updated>2009-11-25T04:08:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Wed Nov 25 04:08:13 2009
New Revision: 883975

URL: http://svn.apache.org/viewvc?rev=883975&amp;view=rev
Log:
 - "Lucene in Action" samples converted to new Lucene 3.0 API

Added:
    lucene/pylucene/trunk/samples/LuceneInAction/CollectorTest.py
      - copied, changed from r820102, lucene/pylucene/trunk/samples/LuceneInAction/HitCollectorTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/MultiPhraseQueryTest.py
      - copied, changed from r820102, lucene/pylucene/trunk/samples/LuceneInAction/PhrasePrefixQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/NumericRangeQueryTest.py   (with props)
    lucene/pylucene/trunk/samples/LuceneInAction/TermRangeQueryTest.py
      - copied, changed from r820102, lucene/pylucene/trunk/samples/LuceneInAction/RangeQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiPhraseQueryTest.py
      - copied, changed from r820102, lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/PhrasePrefixQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/BookLinkCollector.py   (with props)
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/CollectorTest.py   (with props)
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/collector/__init__.py   (with props)
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/TestSpecialsAccessor.py
      - copied, changed from r820102, lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/MockSpecialsAccessor.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/NumericRangeQueryTest.py   (with props)
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/TermRangeQueryTest.py
      - copied, changed from r820102, lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/RangeQueryTest.py
Removed:
    lucene/pylucene/trunk/samples/LuceneInAction/HitCollectorTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/PhrasePrefixQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/RangeQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/PhrasePrefixQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/MockSpecialsAccessor.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/hitcollector/
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/RangeQueryTest.py
Modified:
    lucene/pylucene/trunk/CHANGES
    lucene/pylucene/trunk/Makefile
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFilter.java
    lucene/pylucene/trunk/jcc/CHANGES
    lucene/pylucene/trunk/samples/LuceneInAction/AdvancedQueryParserTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/AnalysisParalysisTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerDemo.py
    lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerUtils.py
    lucene/pylucene/trunk/samples/LuceneInAction/BasicSearchingTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbIndexer.py
    lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbSearcher.py
    lucene/pylucene/trunk/samples/LuceneInAction/BooksLikeThis.py
    lucene/pylucene/trunk/samples/LuceneInAction/BooleanQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/CategorizerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/ChineseTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/CompoundVersusMultiFileIndexTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/DistanceSortingTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/DocumentDeleteTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/DocumentUpdateTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/Explainer.py
    lucene/pylucene/trunk/samples/LuceneInAction/FS2RAMDirectoryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/FSversusRAMDirectoryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/FieldLengthTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/FileIndexer.py
    lucene/pylucene/trunk/samples/LuceneInAction/FilterTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/HighlightIt.py
    lucene/pylucene/trunk/samples/LuceneInAction/HighlightTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/IndexTuningDemo.py
    lucene/pylucene/trunk/samples/LuceneInAction/Indexer.py
    lucene/pylucene/trunk/samples/LuceneInAction/KeywordAnalyzerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/LockTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/MultiFieldQueryParserTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/MultiSearcherTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/PhraseQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/PositionalPorterStopAnalyzerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/PrefixQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/QueryParserTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/ScoreTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/Searcher.py
    lucene/pylucene/trunk/samples/LuceneInAction/SecurityFilterTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/SnowballTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/SortingExample.py
    lucene/pylucene/trunk/samples/LuceneInAction/SpanQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/SpecialsFilterTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerAlternativeTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerViewer.py
    lucene/pylucene/trunk/samples/LuceneInAction/T9er.py
    lucene/pylucene/trunk/samples/LuceneInAction/VerboseIndexing.py
    lucene/pylucene/trunk/samples/LuceneInAction/index.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/CategorizerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/FilterTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiFieldQueryParserTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiSearcherTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SecurityFilterTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SpanQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/i18n/ChineseTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/keyword/KeywordAnalyzerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzer.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/queryparser/AnalysisParalysisTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzer2.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerAlternativeTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerFlawed.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/stopanalyzer/StopAnalyzerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzer.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymAnalyzerTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/synonym/SynonymFilter.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/common/LiaTestCase.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/common/TestDataDocumentHandler.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilter.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/filters/SpecialsFilterTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/AdvancedQueryParserTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/queryparser/CustomQueryParser.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceComparatorSource.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/extsearch/sorting/DistanceSortingTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/BaseIndexingTestCase.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/CompoundVersusMultiFileIndexTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentDeleteTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/DocumentUpdateTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FS2RAMDirectoryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FSversusRAMDirectoryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/FieldLengthTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/indexing/LockTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BasicSearchingTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/BooleanQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PhraseQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/PrefixQueryTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/QueryParserTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/searching/ScoreTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/HighlightTest.py
    lucene/pylucene/trunk/samples/LuceneInAction/lia/tools/SnowballTest.py
    lucene/pylucene/trunk/test/test_Similarity.py

Modified: lucene/pylucene/trunk/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/CHANGES?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/CHANGES (original)
+++ lucene/pylucene/trunk/CHANGES Wed Nov 25 04:08:13 2009
@@ -1,10 +1,11 @@
 
-Version 2.9.0 -&gt; 
+Version 2.9.0 -&gt; 3.0.0
 ----------------------
  - unit tests ported to new API
  - removed InstantiatedIndex contrib from default build
  - with (partial) JCC Java generics support, a lot less downcasting is needed
  - Java Lucene sources now included in PyLucene source distribution
+ - "Lucene in Action" samples converted to new Lucene 3.0 API
  - 
 
 Version 2.4.1 -&gt; 2.9.0

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Wed Nov 25 04:08:13 2009
@@ -15,9 +15,9 @@
 #
 
 VERSION=3.0.0-0
-LUCENE_SVN_VER=HEAD
+LUCENE_SVN_VER=883080
 LUCENE_VER=3.0.0
-LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/trunk
+LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/branches/lucene_3_0
 PYLUCENE:=$(shell pwd)
 LUCENE=lucene-java-$(LUCENE_VER)
 
@@ -253,7 +253,7 @@
 
 test: install-test samples/LuceneInAction/index
 	find test -name 'test_*.py' | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
-#	ls samples/LuceneInAction/*Test.py | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
+	ls samples/LuceneInAction/*Test.py | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
 
 
 ARCHIVE=pylucene-$(VERSION)-src.tar.gz

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFilter.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFilter.java?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFilter.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonFilter.java Wed Nov 25 04:08:13 2009
@@ -18,8 +18,8 @@
 import java.io.IOException;
 
 import org.apache.lucene.search.Filter;
+import org.apache.lucene.search.DocIdSet;
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.util.DocIdBitSet;
 
 
 public class PythonFilter extends Filter {
@@ -46,6 +46,6 @@
     }
 
     public native void pythonDecRef();
-    public native DocIdBitSet getDocIdSet(IndexReader reader)
+    public native DocIdSet getDocIdSet(IndexReader reader)
         throws IOException;
 }

Modified: lucene/pylucene/trunk/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/CHANGES?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/CHANGES (original)
+++ lucene/pylucene/trunk/jcc/CHANGES Wed Nov 25 04:08:13 2009
@@ -1,5 +1,5 @@
 
-Version 2.4 -&gt;
+Version 2.4 -&gt; 2.5
 ------------------
  - added env.jni_version for the JNI version as returned by JNI's GetVersion()
  - added env.java_version for java.lang.System.getProperty('java.version')

Modified: lucene/pylucene/trunk/samples/LuceneInAction/AdvancedQueryParserTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/AdvancedQueryParserTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/AdvancedQueryParserTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/AdvancedQueryParserTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/AnalysisParalysisTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/AnalysisParalysisTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/AnalysisParalysisTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/AnalysisParalysisTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerDemo.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerDemo.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerDemo.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerDemo.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerUtils.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerUtils.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerUtils.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/AnalyzerUtils.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/BasicSearchingTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/BasicSearchingTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/BasicSearchingTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/BasicSearchingTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbIndexer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbIndexer.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbIndexer.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbIndexer.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbSearcher.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbSearcher.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbSearcher.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/BerkeleyDbSearcher.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/BooksLikeThis.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/BooksLikeThis.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/BooksLikeThis.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/BooksLikeThis.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/BooleanQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/BooleanQueryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/BooleanQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/BooleanQueryTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/CategorizerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/CategorizerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/CategorizerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/CategorizerTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/ChineseTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/ChineseTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/ChineseTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/ChineseTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Copied: lucene/pylucene/trunk/samples/LuceneInAction/CollectorTest.py (from r820102, lucene/pylucene/trunk/samples/LuceneInAction/HitCollectorTest.py)
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/CollectorTest.py?p2=lucene/pylucene/trunk/samples/LuceneInAction/CollectorTest.py&amp;p1=lucene/pylucene/trunk/samples/LuceneInAction/HitCollectorTest.py&amp;r1=820102&amp;r2=883975&amp;rev=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/HitCollectorTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/CollectorTest.py Wed Nov 25 04:08:13 2009
@@ -1,12 +1,12 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)
 
-import lia.extsearch.hitcollector.HitCollectorTest
+import lia.extsearch.collector.CollectorTest
 from lucene import System
 
 System.setProperty("index.dir", os.path.join(baseDir, 'index'))
-unittest.main(lia.extsearch.hitcollector.HitCollectorTest)
+unittest.main(lia.extsearch.collector.CollectorTest)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/CompoundVersusMultiFileIndexTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/CompoundVersusMultiFileIndexTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/CompoundVersusMultiFileIndexTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/CompoundVersusMultiFileIndexTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/DistanceSortingTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/DistanceSortingTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/DistanceSortingTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/DistanceSortingTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/DocumentDeleteTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/DocumentDeleteTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/DocumentDeleteTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/DocumentDeleteTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/DocumentUpdateTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/DocumentUpdateTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/DocumentUpdateTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/DocumentUpdateTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/Explainer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/Explainer.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/Explainer.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/Explainer.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/FS2RAMDirectoryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/FS2RAMDirectoryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/FS2RAMDirectoryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/FS2RAMDirectoryTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/FSversusRAMDirectoryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/FSversusRAMDirectoryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/FSversusRAMDirectoryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/FSversusRAMDirectoryTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/FieldLengthTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/FieldLengthTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/FieldLengthTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/FieldLengthTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/FileIndexer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/FileIndexer.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/FileIndexer.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/FileIndexer.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/FilterTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/FilterTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/FilterTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/FilterTest.py Wed Nov 25 04:08:13 2009
@@ -1,14 +1,14 @@
 
 # sample needs to be rewritten to use RangeFilter
 
-#import os, sys, unittest, lucene
-#lucene.initVM(lucene.CLASSPATH)
-#
-#baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
-#sys.path.append(baseDir)
-#
-#import lia.advsearching.FilterTest
-#from lucene import System
-#
-#System.setProperty("index.dir", os.path.join(baseDir, 'index'))
-#unittest.main(lia.advsearching.FilterTest)
+import os, sys, unittest, lucene
+lucene.initVM()
+
+baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
+sys.path.append(baseDir)
+
+import lia.advsearching.FilterTest
+from lucene import System
+
+System.setProperty("index.dir", os.path.join(baseDir, 'index'))
+unittest.main(lia.advsearching.FilterTest)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/HighlightIt.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/HighlightIt.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/HighlightIt.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/HighlightIt.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/HighlightTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/HighlightTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/HighlightTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/HighlightTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/IndexTuningDemo.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/IndexTuningDemo.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/IndexTuningDemo.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/IndexTuningDemo.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/Indexer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/Indexer.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/Indexer.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/Indexer.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/KeywordAnalyzerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/KeywordAnalyzerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/KeywordAnalyzerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/KeywordAnalyzerTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/LockTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/LockTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/LockTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/LockTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/MultiFieldQueryParserTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/MultiFieldQueryParserTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/MultiFieldQueryParserTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/MultiFieldQueryParserTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Copied: lucene/pylucene/trunk/samples/LuceneInAction/MultiPhraseQueryTest.py (from r820102, lucene/pylucene/trunk/samples/LuceneInAction/PhrasePrefixQueryTest.py)
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/MultiPhraseQueryTest.py?p2=lucene/pylucene/trunk/samples/LuceneInAction/MultiPhraseQueryTest.py&amp;p1=lucene/pylucene/trunk/samples/LuceneInAction/PhrasePrefixQueryTest.py&amp;r1=820102&amp;r2=883975&amp;rev=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/PhrasePrefixQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/MultiPhraseQueryTest.py Wed Nov 25 04:08:13 2009
@@ -1,10 +1,8 @@
 
-# sample needs to be rewritten to use MultiPhraseQuery
+import os, sys, unittest, lucene
+lucene.initVM()
 
-#import os, sys, unittest, lucene
-#lucene.initVM(lucene.CLASSPATH)
-#
-#sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
-#
-#import lia.advsearching.PhrasePrefixQueryTest
-#unittest.main(lia.advsearching.PhrasePrefixQueryTest)
+sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
+
+import lia.advsearching.MultiPhraseQueryTest
+unittest.main(lia.advsearching.MultiPhraseQueryTest)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/MultiSearcherTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/MultiSearcherTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/MultiSearcherTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/MultiSearcherTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Added: lucene/pylucene/trunk/samples/LuceneInAction/NumericRangeQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/NumericRangeQueryTest.py?rev=883975&amp;view=auto
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/NumericRangeQueryTest.py (added)
+++ lucene/pylucene/trunk/samples/LuceneInAction/NumericRangeQueryTest.py Wed Nov 25 04:08:13 2009
@@ -0,0 +1,12 @@
+
+import os, sys, unittest, lucene
+lucene.initVM()
+
+baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
+sys.path.append(baseDir)
+
+import lia.searching.NumericRangeQueryTest
+from lucene import System
+
+System.setProperty("index.dir", os.path.join(baseDir, 'index'))
+unittest.main(lia.searching.NumericRangeQueryTest)

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/NumericRangeQueryTest.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/pylucene/trunk/samples/LuceneInAction/NumericRangeQueryTest.py
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: lucene/pylucene/trunk/samples/LuceneInAction/PhraseQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/PhraseQueryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/PhraseQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/PhraseQueryTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/PositionalPorterStopAnalyzerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/PositionalPorterStopAnalyzerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/PositionalPorterStopAnalyzerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/PositionalPorterStopAnalyzerTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/PrefixQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/PrefixQueryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/PrefixQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/PrefixQueryTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/QueryParserTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/QueryParserTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/QueryParserTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/QueryParserTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/ScoreTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/ScoreTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/ScoreTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/ScoreTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/Searcher.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/Searcher.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/Searcher.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/Searcher.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/SecurityFilterTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/SecurityFilterTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/SecurityFilterTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/SecurityFilterTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/SnowballTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/SnowballTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/SnowballTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/SnowballTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/SortingExample.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/SortingExample.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/SortingExample.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/SortingExample.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/SpanQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/SpanQueryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/SpanQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/SpanQueryTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/SpecialsFilterTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/SpecialsFilterTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/SpecialsFilterTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/SpecialsFilterTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerAlternativeTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerAlternativeTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerAlternativeTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerAlternativeTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/StopAnalyzerTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerTest.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerViewer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerViewer.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerViewer.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/SynonymAnalyzerViewer.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/T9er.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/T9er.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/T9er.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/T9er.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Copied: lucene/pylucene/trunk/samples/LuceneInAction/TermRangeQueryTest.py (from r820102, lucene/pylucene/trunk/samples/LuceneInAction/RangeQueryTest.py)
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/TermRangeQueryTest.py?p2=lucene/pylucene/trunk/samples/LuceneInAction/TermRangeQueryTest.py&amp;p1=lucene/pylucene/trunk/samples/LuceneInAction/RangeQueryTest.py&amp;r1=820102&amp;r2=883975&amp;rev=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/RangeQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/TermRangeQueryTest.py Wed Nov 25 04:08:13 2009
@@ -1,12 +1,12 @@
 
 import os, sys, unittest, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)
 
-import lia.searching.RangeQueryTest
+import lia.searching.TermRangeQueryTest
 from lucene import System
 
 System.setProperty("index.dir", os.path.join(baseDir, 'index'))
-unittest.main(lia.searching.RangeQueryTest)
+unittest.main(lia.searching.TermRangeQueryTest)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/VerboseIndexing.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/VerboseIndexing.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/VerboseIndexing.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/VerboseIndexing.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/index.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/index.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/index.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/index.py Wed Nov 25 04:08:13 2009
@@ -1,6 +1,6 @@
 
 import os, sys, tarfile, lucene
-lucene.initVM(lucene.CLASSPATH)
+lucene.initVM()
 
 baseDir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.append(baseDir)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/CategorizerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/CategorizerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/CategorizerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/CategorizerTest.py Wed Nov 25 04:08:13 2009
@@ -44,7 +44,7 @@
 
     def buildCategoryVectors(self):
 
-        reader = IndexReader.open(self.directory)
+        reader = IndexReader.open(self.directory, True)
 
         for id in xrange(reader.maxDoc()):
             doc = reader.document(id)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/FilterTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/FilterTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/FilterTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/FilterTest.py Wed Nov 25 04:08:13 2009
@@ -14,9 +14,11 @@
 
 from lia.common.LiaTestCase import LiaTestCase
 
-from lucene import \
-     Term, BooleanQuery, IndexSearcher, TermQuery, DateField, \
-     CachingWrapperFilter, DateFilter, RangeQuery, QueryFilter, BooleanClause
+from lucene import Integer, \
+     IndexSearcher, Term, TermQuery, MatchAllDocsQuery, \
+     BooleanQuery, BooleanClause, CachingWrapperFilter, \
+     TermRangeFilter, NumericRangeFilter, FieldCacheRangeFilter, \
+     FieldCacheTermsFilter, QueryWrapperFilter, PrefixFilter
      
 
 class FilterTest(LiaTestCase):
@@ -25,34 +27,62 @@
 
         super(FilterTest, self).setUp()
 
-        self.allBooks = RangeQuery(Term("pubmonth", "190001"),
-                                   Term("pubmonth", "200512"), True)
-        self.searcher = IndexSearcher(self.directory)
-        hits = self.searcher.search(self.allBooks)
-        self.numAllBooks = len(hits)
+        self.allBooks = MatchAllDocsQuery()
+        self.searcher = IndexSearcher(self.directory, True)
+        scoreDocs = self.searcher.search(self.allBooks, 50).scoreDocs
+        self.numAllBooks = len(scoreDocs)
+
+    def testTermRangeFilter(self):
+
+        filter = TermRangeFilter("title2", "d", "j", True, True)
+        scoreDocs = self.searcher.search(self.allBooks, filter, 50).scoreDocs
+        self.assertEqual(3, len(scoreDocs))
+
+    def testNumericDateFilter(self):
+
+        filter = NumericRangeFilter.newIntRange("pubmonth",
+                                                Integer(198805),
+                                                Integer(198810),
+                                                True, True)
+        scoreDocs = self.searcher.search(self.allBooks, filter, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs))
+
+    def testFieldCacheRangeFilter(self):
+
+        filter = FieldCacheRangeFilter.newStringRange("title2", "d", "j",
+                                                      True, True)
+        scoreDocs = self.searcher.search(self.allBooks, filter, 50).scoreDocs
+        self.assertEqual(3, len(scoreDocs))
+
+        filter = FieldCacheRangeFilter.newIntRange("pubmonth",
+                                                   Integer(198805),
+                                                   Integer(198810),
+                                                   True, True)
+        scoreDocs = self.searcher.search(self.allBooks, filter, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs))
+
+    def testFieldCacheTermsFilter(self):
+
+        filter = FieldCacheTermsFilter("category",
+                                       ["/health/alternative/chinese",
+                                        "/technology/computers/ai",
+                                        "/technology/computers/programming"])
+        scoreDocs = self.searcher.search(self.allBooks, filter, 50).scoreDocs
+        self.assertEqual(7, len(scoreDocs), "expected 7 hits")
 
-    def testDateFilter(self):
-
-        jan1 = self.parseDate("2004-01-01")
-        jan31 = self.parseDate("2004-01-31")
-        dec31 = self.parseDate("2004-12-31")
-
-        filter = DateFilter("modified", jan1, dec31)
-
-        hits = self.searcher.search(self.allBooks, filter)
-        self.assertEqual(self.numAllBooks, len(hits), "all modified in 2004")
-
-        filter = DateFilter("modified", jan1, jan31)
-        hits = self.searcher.search(self.allBooks, filter)
-        self.assertEqual(0, len(hits), "none modified in January")
-
-    def testQueryFilter(self):
+    def testQueryWrapperFilter(self):
 
         categoryQuery = TermQuery(Term("category", "/philosophy/eastern"))
-        categoryFilter = QueryFilter(categoryQuery)
+        categoryFilter = QueryWrapperFilter(categoryQuery)
+        scoreDocs = self.searcher.search(self.allBooks, categoryFilter, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs), "only tao te ching")
 
-        hits = self.searcher.search(self.allBooks, categoryFilter)
-        self.assertEqual(1, len(hits), "only tao te ching")
+    def testSpanQueryFilter(self):
+        
+        categoryQuery = TermQuery(Term("category", "/philosophy/eastern"))
+        categoryFilter = QueryWrapperFilter(categoryQuery)
+        scoreDocs = self.searcher.search(self.allBooks, categoryFilter, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs), "only tao te ching")
 
     def testFilterAlternative(self):
 
@@ -62,30 +92,19 @@
         constrainedQuery.add(self.allBooks, BooleanClause.Occur.MUST)
         constrainedQuery.add(categoryQuery, BooleanClause.Occur.MUST)
 
-        hits = self.searcher.search(constrainedQuery)
-        self.assertEqual(1, len(hits), "only tao te ching")
+        scoreDocs = self.searcher.search(constrainedQuery, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs), "only tao te ching")
 
-    def testQueryFilterWithRangeQuery(self):
+    def testPrefixFilter(self):
 
-        jan1 = self.parseDate("2004-01-01")
-        dec31 = self.parseDate("2004-12-31")
-
-        start = Term("modified", DateField.dateToString(jan1))
-        end = Term("modified", DateField.dateToString(dec31))
-
-        rangeQuery = RangeQuery(start, end, True)
-
-        filter = QueryFilter(rangeQuery)
-        hits = self.searcher.search(self.allBooks, filter)
-        self.assertEqual(self.numAllBooks, len(hits), "all of 'em")
+        prefixFilter = PrefixFilter(Term("category", "/technology/computers"))
+        scoreDocs = self.searcher.search(self.allBooks, prefixFilter, 50).scoreDocs
+        self.assertEqual(8, len(scoreDocs),
+                         "only /technology/computers/* books")
 
     def testCachingWrapper(self):
 
-        jan1 = self.parseDate("2004-01-01")
-        dec31 = self.parseDate("2004-12-31")
-
-        dateFilter = DateFilter("modified", jan1, dec31)
-        cachingFilter = CachingWrapperFilter(dateFilter)
-
-        hits = self.searcher.search(self.allBooks, cachingFilter)
-        self.assertEqual(self.numAllBooks, len(hits), "all of 'em")
+        filter = TermRangeFilter("title2", "d", "j", True, True)
+        cachingFilter = CachingWrapperFilter(filter)
+        scoreDocs = self.searcher.search(self.allBooks, cachingFilter, 50).scoreDocs
+        self.assertEqual(3, len(scoreDocs))

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiFieldQueryParserTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiFieldQueryParserTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiFieldQueryParserTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiFieldQueryParserTest.py Wed Nov 25 04:08:13 2009
@@ -15,7 +15,8 @@
 from lia.common.LiaTestCase import LiaTestCase
 
 from lucene import \
-    SimpleAnalyzer, MultiFieldQueryParser, IndexSearcher, BooleanClause
+    SimpleAnalyzer, MultiFieldQueryParser, IndexSearcher, BooleanClause, \
+    Version
 
 
 class MultiFieldQueryParserTest(LiaTestCase):
@@ -23,29 +24,32 @@
     def testDefaultOperator(self):
 
         SHOULD = BooleanClause.Occur.SHOULD
-        query = MultiFieldQueryParser.parse("development",
-                                            ["title", "subject"],
+        query = MultiFieldQueryParser.parse(Version.LUCENE_CURRENT,
+                                            "development", ["title", "subject"],
                                             [SHOULD, SHOULD],
                                             SimpleAnalyzer())
 
-        searcher = IndexSearcher(self.directory)
-        hits = searcher.search(query)
+        searcher = IndexSearcher(self.directory, True)
+        scoreDocs = searcher.search(query, 50).scoreDocs
 
-        self.assertHitsIncludeTitle(hits, "Java Development with Ant")
+        self.assertHitsIncludeTitle(searcher, scoreDocs,
+                                    "Java Development with Ant")
 
         # has "development" in the subject field
-        self.assertHitsIncludeTitle(hits, "Extreme Programming Explained")
+        self.assertHitsIncludeTitle(searcher, scoreDocs,
+                                    "Extreme Programming Explained")
 
     def testSpecifiedOperator(self):
         
         MUST = BooleanClause.Occur.MUST
-        query = MultiFieldQueryParser.parse("development",
-                                            ["title", "subject"],
+        query = MultiFieldQueryParser.parse(Version.LUCENE_CURRENT,
+                                            "development", ["title", "subject"],
                                             [MUST, MUST],
                                             SimpleAnalyzer())
 
-        searcher = IndexSearcher(self.directory)
-        hits = searcher.search(query)
+        searcher = IndexSearcher(self.directory, True)
+        scoreDocs = searcher.search(query, 50).scoreDocs
 
-        self.assertHitsIncludeTitle(hits, "Java Development with Ant")
-        self.assertEqual(1, hits.length(), "one and only one")
+        self.assertHitsIncludeTitle(searcher, scoreDocs,
+                                    "Java Development with Ant")
+        self.assertEqual(1, len(scoreDocs), "one and only one")

Copied: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiPhraseQueryTest.py (from r820102, lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/PhrasePrefixQueryTest.py)
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiPhraseQueryTest.py?p2=lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiPhraseQueryTest.py&amp;p1=lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/PhrasePrefixQueryTest.py&amp;r1=820102&amp;r2=883975&amp;rev=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/PhrasePrefixQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiPhraseQueryTest.py Wed Nov 25 04:08:13 2009
@@ -15,42 +15,44 @@
 from unittest import TestCase
 from lucene import \
      WhitespaceAnalyzer, Document, Field, IndexWriter, Term, BooleanQuery, \
-     IndexSearcher, PhrasePrefixQuery, PhraseQuery, RAMDirectory, BooleanClause
+     IndexSearcher, MultiPhraseQuery, PhraseQuery, RAMDirectory, BooleanClause
 
 
-class PhrasePrefixQueryTest(TestCase):
+class MultiPhraseQueryTest(TestCase):
 
     def setUp(self):
 
         directory = RAMDirectory()
-        writer = IndexWriter(directory, WhitespaceAnalyzer(), True)
+        writer = IndexWriter(directory, WhitespaceAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
 
         doc1 = Document()
         doc1.add(Field("field", "the quick brown fox jumped over the lazy dog",
-                       Field.Store.YES, Field.Index.TOKENIZED))
+                       Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(doc1)
 
         doc2 = Document()
         doc2.add(Field("field", "the fast fox hopped over the hound",
-                       Field.Store.YES, Field.Index.TOKENIZED))
+                       Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(doc2)
         writer.close()
 
-        self.searcher = IndexSearcher(directory)
+        self.searcher = IndexSearcher(directory, True)
 
     def testBasic(self):
         
-        query = PhrasePrefixQuery()
-        query.add([Term("field", "quick"), Term("field", "fast")])
+        query = MultiPhraseQuery()
+        query.add([Term("field", "quick"),
+                   Term("field", "fast")])
         query.add(Term("field", "fox"))
         print query
 
-        hits = self.searcher.search(query)
-        self.assertEqual(1, len(hits), "fast fox match")
+        topDocs = self.searcher.search(query, 10)
+        self.assertEqual(1, topDocs.totalHits, "fast fox match")
 
-        query.setSlop(1)
-        hits = self.searcher.search(query)
-        self.assertEqual(2, len(hits), "both match")
+        query.setSlop(1);
+        topDocs = self.searcher.search(query, 10)
+        self.assertEqual(2, topDocs.totalHits, "both match");
 
     def testAgainstOR(self):
 
@@ -66,8 +68,8 @@
         query = BooleanQuery()
         query.add(quickFox, BooleanClause.Occur.SHOULD)
         query.add(fastFox, BooleanClause.Occur.SHOULD)
-        hits = self.searcher.search(query)
-        self.assertEqual(2, len(hits))
+        topDocs = self.searcher.search(query, 10)
+        self.assertEqual(2, topDocs.totalHits)
 
     def debug(self, hits):
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiSearcherTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiSearcherTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiSearcherTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/MultiSearcherTest.py Wed Nov 25 04:08:13 2009
@@ -15,7 +15,7 @@
 from unittest import TestCase
 from lucene import \
      WhitespaceAnalyzer, Document, Field, IndexWriter, Term, MultiSearcher, \
-     RangeQuery, RAMDirectory, IndexSearcher
+     TermRangeQuery, RAMDirectory, IndexSearcher
 
 
 class MultiSearcherTest(TestCase):
@@ -35,13 +35,15 @@
         aTOmDirectory = RAMDirectory()
         nTOzDirectory = RAMDirectory()
 
-        aTOmWriter = IndexWriter(aTOmDirectory, analyzer, True)
-        nTOzWriter = IndexWriter(nTOzDirectory, analyzer, True)
+        aTOmWriter = IndexWriter(aTOmDirectory, analyzer, True,
+                                 IndexWriter.MaxFieldLength.UNLIMITED)
+        nTOzWriter = IndexWriter(nTOzDirectory, analyzer, True,
+                                 IndexWriter.MaxFieldLength.UNLIMITED)
 
         for animal in animals:
             doc = Document()
             doc.add(Field("animal", animal,
-                          Field.Store.YES, Field.Index.UN_TOKENIZED))
+                          Field.Store.YES, Field.Index.NOT_ANALYZED))
 
             if animal[0].lower() &lt; "n":
                 aTOmWriter.addDocument(doc)
@@ -59,7 +61,7 @@
         searcher = MultiSearcher(self.searchers)
 
         # range spans documents across both indexes
-        query = RangeQuery(Term("animal", "h"), Term("animal", "t"), True)
+        query = TermRangeQuery("animal", "h", "t", True, True)
 
-        hits = searcher.search(query)
-        self.assertEqual(12, hits.length(), "tarantula not included")
+        scoreDocs = searcher.search(query, 50).scoreDocs
+        self.assertEqual(12, len(scoreDocs), "tarantula not included")

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SecurityFilterTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SecurityFilterTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SecurityFilterTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SecurityFilterTest.py Wed Nov 25 04:08:13 2009
@@ -14,8 +14,8 @@
 
 from unittest import TestCase
 from lucene import \
-     WhitespaceAnalyzer, Document, Field, IndexWriter, Term, MultiSearcher, \
-     QueryFilter, RAMDirectory, IndexSearcher, TermQuery
+     WhitespaceAnalyzer, Document, Field, IndexWriter, Term, \
+     QueryWrapperFilter, RAMDirectory, IndexSearcher, TermQuery
 
 
 class SecurityFilterTest(TestCase):
@@ -23,22 +23,23 @@
     def setUp(self):
 
         self.directory = RAMDirectory()
-        writer = IndexWriter(self.directory, WhitespaceAnalyzer(), True)
+        writer = IndexWriter(self.directory, WhitespaceAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
 
         # Elwood
         document = Document()
         document.add(Field("owner", "elwood",
-                           Field.Store.YES, Field.Index.UN_TOKENIZED))
+                           Field.Store.YES, Field.Index.NOT_ANALYZED))
         document.add(Field("keywords", "elwoods sensitive info",
-                           Field.Store.YES, Field.Index.TOKENIZED))
+                           Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(document)
 
         # Jake
         document = Document()
         document.add(Field("owner", "jake",
-                           Field.Store.YES, Field.Index.UN_TOKENIZED))
+                           Field.Store.YES, Field.Index.NOT_ANALYZED))
         document.add(Field("keywords", "jakes sensitive info",
-                           Field.Store.YES, Field.Index.TOKENIZED))
+                           Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(document)
 
         writer.close()
@@ -47,13 +48,14 @@
 
         query = TermQuery(Term("keywords", "info"))
 
-        searcher = IndexSearcher(self.directory)
-        hits = searcher.search(query)
-        self.assertEqual(2, len(hits), "Both documents match")
-
-        jakeFilter = QueryFilter(TermQuery(Term("owner", "jake")))
-
-        hits = searcher.search(query, jakeFilter)
-        self.assertEqual(1, len(hits))
-        self.assertEqual("jakes sensitive info", hits[0].get("keywords"),
+        searcher = IndexSearcher(self.directory, True)
+        topDocs = searcher.search(query, 50)
+        self.assertEqual(2, topDocs.totalHits, "Both documents match")
+
+        jakeFilter = QueryWrapperFilter(TermQuery(Term("owner", "jake")))
+
+        scoreDocs = searcher.search(query, jakeFilter, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs))
+        self.assertEqual("jakes sensitive info",
+                         searcher.doc(scoreDocs[0].doc).get("keywords"),
                          "elwood is safe")

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SpanQueryTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SpanQueryTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SpanQueryTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/advsearching/SpanQueryTest.py Wed Nov 25 04:08:13 2009
@@ -18,7 +18,7 @@
 from lucene import \
      WhitespaceAnalyzer, Document, Field, IndexReader, IndexWriter, Term, \
      IndexSearcher, PhraseQuery, SpanFirstQuery, SpanNearQuery, SpanNotQuery, \
-     SpanOrQuery, SpanTermQuery, RAMDirectory, Hit
+     SpanOrQuery, SpanTermQuery, RAMDirectory, TermAttribute, StringReader
 
 from lia.analysis.AnalyzerUtils import AnalyzerUtils
 
@@ -30,22 +30,23 @@
         self.directory = RAMDirectory()
         self.analyzer = WhitespaceAnalyzer()
 
-        writer = IndexWriter(self.directory, self.analyzer, True)
+        writer = IndexWriter(self.directory, self.analyzer, True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
 
         doc = Document()
         doc.add(Field("f", "the quick brown fox jumps over the lazy dog",
-                      Field.Store.YES, Field.Index.TOKENIZED))
+                      Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(doc)
 
         doc = Document()
         doc.add(Field("f", "the quick red fox jumps over the sleepy cat",
-                      Field.Store.YES, Field.Index.TOKENIZED))
+                      Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(doc)
 
         writer.close()
 
-        self.searcher = IndexSearcher(self.directory)
-        self.reader = IndexReader.open(self.directory)
+        self.searcher = IndexSearcher(self.directory, True)
+        self.reader = IndexReader.open(self.directory, True)
 
         self.quick = SpanTermQuery(Term("f", "quick"))
         self.brown = SpanTermQuery(Term("f", "brown"))
@@ -58,19 +59,19 @@
 
     def assertOnlyBrownFox(self, query):
 
-        hits = self.searcher.search(query)
-        self.assertEqual(1, len(hits))
-        self.assertEqual(0, hits.id(0), "wrong doc")
+        topDocs = self.searcher.search(query, 50)
+        self.assertEqual(1, topDocs.totalHits)
+        self.assertEqual(0, topDocs.scoreDocs[0].doc, "wrong doc")
 
     def assertBothFoxes(self, query):
 
-        hits = self.searcher.search(query)
-        self.assertEqual(2, len(hits))
+        topDocs = self.searcher.search(query, 50)
+        self.assertEqual(2, topDocs.totalHits)
 
     def assertNoMatches(self, query):
 
-        hits = self.searcher.search(query)
-        self.assertEquals(0, len(hits))
+        topDocs = self.searcher.search(query, 50)
+        self.assertEquals(0, topDocs.totalHits)
 
     def testSpanTermQuery(self):
 
@@ -169,11 +170,10 @@
         print "%s:" % query
         numSpans = 0
 
-        hits = self.searcher.search(query)
+        scoreDocs = self.searcher.search(query, 50).scoreDocs
         scores = [0, 0]
-        for hit in hits:
-            hit = Hit.cast_(hit)
-            scores[hit.getId()] = hit.getScore()
+        for scoreDoc in scoreDocs:
+            scores[scoreDoc.doc] = scoreDoc.score
 
         while spans.next():
             numSpans += 1
@@ -183,16 +183,19 @@
 
             # for simplicity - assume tokens are in sequential,
             # positions, starting from 0
-            tokens = AnalyzerUtils.tokensFromAnalysis(self.analyzer, doc["f"])
+            stream = self.analyzer.tokenStream("contents",
+                                               StringReader(doc.get("f")))
+            term = stream.addAttribute(TermAttribute.class_)
+      
             buffer = StringIO()
             buffer.write("   ")
 
             i = 0
-            for token in tokens:
+            while stream.incrementToken():
                 if i == spans.start():
                     buffer.write("&lt;")
 
-                buffer.write(token.termText())
+                buffer.write(term.term())
                 if i + 1 == spans.end():
                     buffer.write("&gt;")
 

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/AnalyzerUtils.py Wed Nov 25 04:08:13 2009
@@ -13,7 +13,8 @@
 # ====================================================================
 
 from lucene import \
-     SimpleAnalyzer, Token, TokenStream, StandardAnalyzer, StringReader
+     SimpleAnalyzer, StandardAnalyzer, StringReader, Version, \
+     TermAttribute, PositionIncrementAttribute, TypeAttribute, OffsetAttribute
 
 
 class AnalyzerUtils(object):
@@ -26,58 +27,104 @@
 
         print "\n----"
         print "StandardAnalyzer"
-        cls.displayTokensWithFullDetails(StandardAnalyzer(),
-                                         "I'll e-mail you at xyz@example.com")
+        cls.displayTokensWithFullDetails(StandardAnalyzer(Version.LUCENE_CURRENT), "I'll e-mail you at xyz@example.com")
 
-    def tokensFromAnalysis(cls, analyzer, text):
-        return [token for token in analyzer.tokenStream("contents", StringReader(text))]
+    def setPositionIncrement(cls, source, posIncr):
+        attr = source.addAttribute(PositionIncrementAttribute.class_)
+        attr.setPositionIncrement(posIncr)
+
+    def getPositionIncrement(cls, source):
+        attr = source.addAttribute(PositionIncrementAttribute.class_)
+        return attr.getPositionIncrement()
+
+    def setTerm(cls, source, term):
+        attr = source.addAttribute(TermAttribute.class_)
+        attr.setTermBuffer(term)
+
+    def getTerm(cls, source):
+        attr = source.addAttribute(TermAttribute.class_)
+        return attr.term()
+
+    def setType(cls, source, type):
+        attr = source.addAttribute(TypeAttribute.class_)
+        attr.setType(type)
+
+    def getType(cls, source):
+        attr = source.addAttribute(TypeAttribute.class_)
+        return attr.type()
 
     def displayTokens(cls, analyzer, text):
 
-        for token in cls.tokensFromAnalysis(analyzer, text):
-            print "[%s]" %(token.termText()),
+        tokenStream = analyzer.tokenStream("contents", StringReader(text))
+        term = tokenStream.addAttribute(TermAttribute.class_)
+
+        while tokenStream.incrementToken():
+            print "[%s]" %(term.term())
 
     def displayTokensWithPositions(cls, analyzer, text):
 
+        stream = analyzer.tokenStream("contents", StringReader(text))
+        term = stream.addAttribute(TermAttribute.class_)
+        posIncr = stream.addAttribute(PositionIncrementAttribute.class_)
+
         position = 0
-        for token in cls.tokensFromAnalysis(analyzer, text):
-            increment = token.getPositionIncrement()
+        while stream.incrementToken():
+            increment = posIncr.getPositionIncrement()
             if increment &gt; 0:
-                position += increment
+                position = position + increment
                 print "\n%d:" %(position),
 
-            print "[%s]" %(token.termText()),
+            print "[%s]" %(term.term()),
+        print
 
     def displayTokensWithFullDetails(cls, analyzer, text):
 
-        position = 0
-        for token in cls.tokensFromAnalysis(analyzer, text):
-            increment = token.getPositionIncrement()
+        stream = analyzer.tokenStream("contents", StringReader(text))
+
+        term = stream.addAttribute(TermAttribute.class_)
+        posIncr = stream.addAttribute(PositionIncrementAttribute.class_)
+        offset = stream.addAttribute(OffsetAttribute.class_)
+        type = stream.addAttribute(TypeAttribute.class_)
 
+        position = 0
+        while stream.incrementToken():
+            increment = posIncr.getPositionIncrement()
             if increment &gt; 0:
-                position += increment
-                print "\n%s:" %(position),
+                position = position + increment
+                print "\n%d:" %(position),
+
+            print "[%s:%d-&gt;%d:%s]" %(term.term(),
+                                     offset.startOffset(),
+                                     offset.endOffset(),
+                                     type.type()),
+        print
+
+    def assertAnalyzesTo(cls, analyzer, input, outputs):
+
+        stream = analyzer.tokenStream("field", StringReader(input))
+        termAttr = stream.addAttribute(TermAttribute.class_)
+        for output in outputs:
+            if not stream.incrementToken():
+                raise AssertionError, 'stream.incremementToken()'
+            if output != termAttr.term():
+                raise AssertionError, 'output == termAttr.term())'
+
+        if stream.incrementToken():
+            raise AssertionError, 'not stream.incremementToken()'
 
-            print "[%s:%d-&gt;%d:%s]" %(token.termText(),
-                                     token.startOffset(),
-                                     token.endOffset(),
-                                     token.type()),
-
-    def assertTokensEqual(cls, unittest, tokens, strings):
-
-        unittest.assertEqual(len(strings), len(tokens))
-
-        i = 0
-        for token in tokens:
-            unittest.assertEqual(strings[i], token.termText(), "index %d" %(i))
-            i += 1
+        stream.close()
 
     main = classmethod(main)
-    tokensFromAnalysis = classmethod(tokensFromAnalysis)
+    setPositionIncrement = classmethod(setPositionIncrement)
+    getPositionIncrement = classmethod(getPositionIncrement)
+    setTerm = classmethod(setTerm)
+    getTerm = classmethod(getTerm)
+    setType = classmethod(setType)
+    getType = classmethod(getType)
     displayTokens = classmethod(displayTokens)
     displayTokensWithPositions = classmethod(displayTokensWithPositions)
     displayTokensWithFullDetails = classmethod(displayTokensWithFullDetails)
-    assertTokensEqual = classmethod(assertTokensEqual)
+    assertAnalyzesTo = classmethod(assertAnalyzesTo)
 
 
 if __name__ == "__main__":

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/i18n/ChineseTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/i18n/ChineseTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/i18n/ChineseTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/i18n/ChineseTest.py Wed Nov 25 04:08:13 2009
@@ -21,7 +21,8 @@
 
     def testChinese(self):
 
-        searcher = IndexSearcher(self.directory)
-        hits = searcher.search(TermQuery(Term("contents", "é")))
+        searcher = IndexSearcher(self.directory, True)
+        query = TermQuery(Term("contents", "é"))
+        scoreDocs = searcher.search(query, 50).scoreDocs
 
-        self.assertEqual(1, hits.length(), "tao")
+        self.assertEqual(1, len(scoreDocs), "tao")

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/keyword/KeywordAnalyzerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/keyword/KeywordAnalyzerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/keyword/KeywordAnalyzerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/keyword/KeywordAnalyzerTest.py Wed Nov 25 04:08:13 2009
@@ -17,7 +17,8 @@
 from lucene import \
      IndexWriter, Term, SimpleAnalyzer, PerFieldAnalyzerWrapper, \
      RAMDirectory, Document, Field, IndexSearcher, TermQuery, \
-     QueryParser, Analyzer, StringReader, Token, JavaError
+     QueryParser, Analyzer, StringReader, Token, JavaError, \
+     Version
 
 from lia.analysis.keyword.KeywordAnalyzer import KeywordAnalyzer
 from lia.analysis.keyword.SimpleKeywordAnalyzer import SimpleKeywordAnalyzer
@@ -28,53 +29,44 @@
     def setUp(self):
 
         self.directory = RAMDirectory()
-        writer = IndexWriter(self.directory, SimpleAnalyzer(), True)
+        writer = IndexWriter(self.directory, SimpleAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
 
         doc = Document()
         doc.add(Field("partnum", "Q36",
-                      Field.Store.YES, Field.Index.UN_TOKENIZED))
+                      Field.Store.YES, Field.Index.NOT_ANALYZED))
         doc.add(Field("description", "Illidium Space Modulator",
-                      Field.Store.YES, Field.Index.TOKENIZED))
+                      Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(doc)
         writer.close()
 
-        self.searcher = IndexSearcher(self.directory)
+        self.searcher = IndexSearcher(self.directory, True)
 
     def testTermQuery(self):
 
         query = TermQuery(Term("partnum", "Q36"))
-        hits = self.searcher.search(query)
-        self.assertEqual(1, hits.length())
+        scoreDocs = self.searcher.search(query, 50).scoreDocs
+        self.assertEqual(1, len(scoreDocs))
 
     def testBasicQueryParser(self):
-        
-        query = QueryParser("description",
-                            SimpleAnalyzer()).parse("partnum:Q36 AND SPACE")
 
-        hits = self.searcher.search(query)
+        analyzer = SimpleAnalyzer()
+        query = QueryParser(Version.LUCENE_CURRENT, "description",
+                            analyzer).parse("partnum:Q36 AND SPACE")
+
+        scoreDocs = self.searcher.search(query, 50).scoreDocs
         self.assertEqual("+partnum:q +space", query.toString("description"),
                          "note Q36 -&gt; q")
-        self.assertEqual(0, hits.length(), "doc not found :(")
+        self.assertEqual(0, len(scoreDocs), "doc not found :(")
 
     def testPerFieldAnalyzer(self):
 
         analyzer = PerFieldAnalyzerWrapper(SimpleAnalyzer())
         analyzer.addAnalyzer("partnum", KeywordAnalyzer())
 
-        query = QueryParser("description",
+        query = QueryParser(Version.LUCENE_CURRENT, "description",
                             analyzer).parse("partnum:Q36 AND SPACE")
-        hits = self.searcher.search(query)
-
-        self.assertEqual("+partnum:Q36 +space", query.toString("description"),
-                         "Q36 kept as-is")
-        self.assertEqual(1, hits.length(), "doc found!")
-
-    def testSimpleKeywordAnalyzer(self):
-
-        analyzer = SimpleKeywordAnalyzer()
+        scoreDocs = self.searcher.search(query, 50).scoreDocs
 
-        input = "Hello World"
-        ts = analyzer.tokenStream("dummy", StringReader(input))
-        self.assertEqual(ts.next().termText(), input)
-        self.assert_(not list(ts) is None)
-        ts.close()
+        #self.assertEqual("+partnum:Q36 +space", query.toString("description"))
+        self.assertEqual(1, len(scoreDocs), "doc found!")

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzer.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzer.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzer.py Wed Nov 25 04:08:13 2009
@@ -36,13 +36,14 @@
         super(PositionalPorterStopAnalyzer, self).__init__()
 
         if stopWords is None:
-            stopWords = StopAnalyzer.ENGLISH_STOP_WORDS
-
-        self.stopWords = set(stopWords)
+            self.stopWords = StopAnalyzer.ENGLISH_STOP_WORDS_SET
+        else:
+            self.stopWords = set(stopWords)
 
     def tokenStream(self, fieldName, reader):
 
-        tokenStream = LowerCaseTokenizer(reader)
-        stopFilter = PositionalStopFilter(tokenStream, self.stopWords)
+        stopFilter = StopFilter(True, LowerCaseTokenizer(reader),
+                                self.stopWords)
+        stopFilter.setEnablePositionIncrements(True)
 
         return PorterStemFilter(stopFilter)

Modified: lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzerTest.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzerTest.py?rev=883975&amp;r1=883974&amp;r2=883975&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzerTest.py (original)
+++ lucene/pylucene/trunk/samples/LuceneInAction/lia/analysis/positional/PositionalPorterStopAnalyzerTest.py Wed Nov 25 04:08:13 2009
@@ -16,7 +16,7 @@
 
 from lucene import \
      IndexWriter, Term, RAMDirectory, Document, Field, \
-     IndexSearcher, QueryParser
+     IndexSearcher, QueryParser, Version
 
 from lia.analysis.AnalyzerUtils import AnalyzerUtils
 from lia.analysis.positional.PositionalPorterStopAnalyzer import \
@@ -30,49 +30,52 @@
     def setUp(self):
 
         self.directory = RAMDirectory()
-        writer = IndexWriter(self.directory, self.porterAnalyzer, True)
+        writer = IndexWriter(self.directory, self.porterAnalyzer, True,
+                             IndexWriter.MaxFieldLength.UNLIMITED)
 
         doc = Document()
         doc.add(Field("contents",
                       "The quick brown fox jumps over the lazy dogs",
-                       Field.Store.YES, Field.Index.TOKENIZED))
+                       Field.Store.YES, Field.Index.ANALYZED))
         writer.addDocument(doc)
         writer.close()
 
     def testStems(self):
         
         searcher = IndexSearcher(self.directory)
-        query = QueryParser("contents", self.porterAnalyzer).parse("laziness")
-        hits = searcher.search(query)
+        query = QueryParser(Version.LUCENE_CURRENT, "contents",
+                            self.porterAnalyzer).parse("laziness")
+        topDocs = searcher.search(query, 50)
 
-        self.assertEqual(1, hits.length(), "lazi")
+        self.assertEqual(1, topDocs.totalHits, "lazi")
 
-        query = QueryParser("contents",
+        query = QueryParser(Version.LUCENE_CURRENT, "contents",
                             self.porterAnalyzer).parse('"fox jumped"')
-        hits = searcher.search(query)
+        topDocs = searcher.search(query, 50)
 
-        self.assertEqual(1, hits.length(), "jump jumps jumped jumping")
+        self.assertEqual(1, topDocs.totalHits, "jump jumps jumped jumping")
 
     def testExactPhrase(self):
 
-        searcher = IndexSearcher(self.directory)
-        query = QueryParser("contents",
+        searcher = IndexSearcher(self.directory, True)
+        query = QueryParser(Version.LUCENE_24, "contents",
                             self.porterAnalyzer).parse('"over the lazy"')
-        hits = searcher.search(query)
+        topDocs = searcher.search(query, 50)
 
-        self.assertEqual(0, hits.length(), "exact match not found!")
+        self.assertEqual(0, topDocs.totalHits, "exact match not found!")
 
     def testWithSlop(self):
 
-        searcher = IndexSearcher(self.directory)
+        searcher = IndexSearcher(self.directory, True)
 
-        parser = QueryParser("contents", self.porterAnalyzer)
+        parser = QueryParser(Version.LUCENE_CURRENT, "contents",
+                             self.porterAnalyzer)
         parser.setPhraseSlop(1)
 
         query = parser.parse('"over the lazy"')
-        hits = searcher.search(query)
+        topDocs = searcher.search(query, 50)
 
-        self.assertEqual(1, hits.length(), "hole accounted for")
+        self.assertEqual(1, topDocs.totalHits, "hole accounted for")
 
     def main(cls):
 




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r882216 - in /lucene/pylucene/site/src/documentation/content/xdocs: index.xml jcc/documentation/readme.xml</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091119174130.0FBE623888D4@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091119174130-0FBE623888D4@eris-apache-org%3e</id>
<updated>2009-11-19T17:41:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Thu Nov 19 17:41:29 2009
New Revision: 882216

URL: http://svn.apache.org/viewvc?rev=882216&amp;view=rev
Log:
   - added news of PyLucene 2.9.1 release
   - added section about how to invoke jcc

Modified:
    lucene/pylucene/site/src/documentation/content/xdocs/index.xml
    lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml

Modified: lucene/pylucene/site/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/lucene/pylucene/site/src/documentation/content/xdocs/index.xml?rev=882216&amp;r1=882215&amp;r2=882216&amp;view=diff
==============================================================================
--- lucene/pylucene/site/src/documentation/content/xdocs/index.xml (original)
+++ lucene/pylucene/site/src/documentation/content/xdocs/index.xml Thu Nov 19 17:41:29 2009
@@ -74,6 +74,18 @@
     &lt;/section&gt;
     &lt;section id="news"&gt;
       &lt;title&gt;News&lt;/title&gt;
+      &lt;section id="news20091110"&gt;
+	&lt;title&gt;10 Nov 2009 - PyLucene 2.9.1-1 available&lt;/title&gt;
+	&lt;p&gt;
+	  This release tracks Lucene Java's recent 2.9.1 &lt;a href="http://lucene.apache.org/java/docs/index.html#6+November+2009+-+Lucene+Java+2.9.1+available"&gt;release&lt;/a&gt;.
+	&lt;/p&gt;
+	&lt;p&gt;
+	  See &lt;a href="http://svn.apache.org/repos/asf/lucene/pylucene/tags/pylucene_2_9_1/CHANGES"&gt;PyLucene
CHANGES&lt;/a&gt; and &lt;a href="http://svn.apache.org/repos/asf/lucene/pylucene/tags/pylucene_2_9_1/jcc/CHANGES"&gt;JCC
CHANGES&lt;/a&gt; for details.
+	&lt;/p&gt;
+	&lt;p&gt;
+	  A source distribution is available &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/pylucene/"&gt;here&lt;/a&gt;.
+	&lt;/p&gt;
+      &lt;/section&gt;
       &lt;section id="news20091013"&gt;
 	&lt;title&gt;13 Oct 2009 - PyLucene 2.9.0-1 available&lt;/title&gt;
 	&lt;p&gt;

Modified: lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml
URL: http://svn.apache.org/viewvc/lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml?rev=882216&amp;r1=882215&amp;r2=882216&amp;view=diff
==============================================================================
--- lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml (original)
+++ lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml Thu
Nov 19 17:41:29 2009
@@ -42,6 +42,25 @@
         information and operating system specific notes.
       &lt;/p&gt;
     &lt;/section&gt;
+    &lt;section id="invoking"&gt;
+      &lt;title&gt;Invoking JCC&lt;/title&gt;
+      &lt;p&gt;
+        JCC is installed as a package and how to invoke it depends on the
+        Python version used:
+      &lt;/p&gt;
+      &lt;ul&gt;
+	&lt;li&gt;python 2.7: &lt;code&gt;python -m jcc&lt;/code&gt;&lt;/li&gt;
+	&lt;li&gt;python 2.6: &lt;code&gt;python -m jcc.__main__&lt;/code&gt;&lt;/li&gt;
+	&lt;li&gt;python 2.5: &lt;code&gt;python -m jcc&lt;/code&gt;&lt;/li&gt;
+	&lt;li&gt;python 2.4:
+	  &lt;ul&gt;
+	    &lt;li&gt;no setuptools: &lt;code&gt;python &lt;/code&gt;&lt;em&gt;&lt;code&gt;site-packages&lt;/code&gt;&lt;/em&gt;&lt;code&gt;/jcc/__init__.py&lt;/code&gt;&lt;/li&gt;
+	    &lt;li&gt;with setuptools: &lt;code&gt;python &lt;/code&gt;&lt;em&gt;&lt;code&gt;site-packages&lt;/code&gt;&lt;/em&gt;/&lt;em&gt;&lt;code&gt;jcc
egg directory&lt;/code&gt;&lt;/em&gt;&lt;code&gt;/jcc/__init__.py&lt;/code&gt;&lt;/li&gt;
+	  &lt;/ul&gt;
+	&lt;/li&gt;
+	&lt;li&gt;python 2.3: &lt;code&gt;python &lt;/code&gt;&lt;em&gt;&lt;code&gt;site-packages&lt;/code&gt;&lt;/em&gt;/&lt;em&gt;&lt;code&gt;jcc
egg directory&lt;/code&gt;&lt;/em&gt;&lt;code&gt;/jcc/__init__.py&lt;/code&gt;&lt;/li&gt;
+      &lt;/ul&gt;
+    &lt;/section&gt;
     &lt;section id="use"&gt;
       &lt;title&gt;Generating C++ and Python wrappers with JCC&lt;/title&gt;
       &lt;p&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r881778 - in /lucene/site: publish/index.html publish/index.pdf src/documentation/content/xdocs/index.xml</title>
<author><name>gsingers@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091118134456.5240D2388892@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091118134456-5240D2388892@eris-apache-org%3e</id>
<updated>2009-11-18T13:44:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: gsingers
Date: Wed Nov 18 13:44:55 2009
New Revision: 881778

URL: http://svn.apache.org/viewvc?rev=881778&amp;view=rev
Log:
mahout 0.2 announcement

Modified:
    lucene/site/publish/index.html
    lucene/site/publish/index.pdf
    lucene/site/src/documentation/content/xdocs/index.xml

Modified: lucene/site/publish/index.html
URL: http://svn.apache.org/viewvc/lucene/site/publish/index.html?rev=881778&amp;r1=881777&amp;r2=881778&amp;view=diff
==============================================================================
--- lucene/site/publish/index.html (original)
+++ lucene/site/publish/index.html Wed Nov 18 13:44:55 2009
@@ -214,6 +214,9 @@
 &lt;a href="#News"&gt;News&lt;/a&gt;
 &lt;ul class="minitoc"&gt;
 &lt;li&gt;
+&lt;a href="#17+Nov.+2009+-+Apache+Mahout+0.2+released"&gt;17 Nov. 2009 - Apache Mahout 0.2
released&lt;/a&gt;
+&lt;/li&gt;
+&lt;li&gt;
 &lt;a href="#10+November+2009+-+Solr+1.4+Released"&gt;10 November 2009 - Solr 1.4 Released&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
@@ -322,7 +325,35 @@
 &lt;a name="N10076"&gt;&lt;/a&gt;&lt;a name="News"&gt;&lt;/a&gt;
 &lt;h2 class="h3"&gt;News&lt;/h2&gt;
 &lt;div class="section"&gt;
-&lt;a name="N1007C"&gt;&lt;/a&gt;&lt;a name="10+November+2009+-+Solr+1.4+Released"&gt;&lt;/a&gt;
+&lt;a name="N1007C"&gt;&lt;/a&gt;&lt;a name="17+Nov.+2009+-+Apache+Mahout+0.2+released"&gt;&lt;/a&gt;
+&lt;h3 class="h4"&gt;17 Nov. 2009 - Apache Mahout 0.2 released&lt;/h3&gt;
+&lt;p&gt;The Apache Lucene project is pleased to announce the release of Apache Mahout 0.2.&lt;/p&gt;
+&lt;p&gt;
+          Highlights include:
+        &lt;/p&gt;
+&lt;ul&gt;
+          
+&lt;li&gt;Significant performance increase (and API changes) in collaborative filtering engine&lt;/li&gt;
+          
+&lt;li&gt;K-nearest-neighbor and SVD recommenders&lt;/li&gt;
+          
+&lt;li&gt;Much code cleanup, bug fixing&lt;/li&gt;
+          
+&lt;li&gt;Random forests, frequent pattern mining using parallel FP growth&lt;/li&gt;
+          
+&lt;li&gt;Latent Dirichlet Allocation&lt;/li&gt;
+          
+&lt;li&gt;Updates for Hadoop 0.20.x&lt;/li&gt;
+        
+&lt;/ul&gt;
+&lt;p&gt;Details on what's included can be found in the&lt;a href="https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12313278&amp;styleName=Html&amp;projectId=12310751"&gt;
+          release notes&lt;/a&gt;.
+        &lt;/p&gt;
+&lt;p&gt;Downloads are available from the
+          &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/mahout/"&gt;Apache Mirrors&lt;/a&gt;
+        
+&lt;/p&gt;
+&lt;a name="N100AC"&gt;&lt;/a&gt;&lt;a name="10+November+2009+-+Solr+1.4+Released"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;10 November 2009 - Solr 1.4 Released&lt;/h3&gt;
 &lt;p&gt;
 	     Solr 1.4 has been released and is now available for public &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/"&gt;download&lt;/a&gt;!
@@ -354,7 +385,7 @@
 &lt;/ul&gt;
 &lt;p&gt;See the &lt;a href="http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.4.0/CHANGES.txt"&gt;release
notes&lt;/a&gt; for more details.
 	 &lt;/p&gt;
-&lt;a name="N100AC"&gt;&lt;/a&gt;&lt;a name="6+November+2009+-+Lucene+Java+2.9.1+available"&gt;&lt;/a&gt;
+&lt;a name="N100DC"&gt;&lt;/a&gt;&lt;a name="6+November+2009+-+Lucene+Java+2.9.1+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;6 November 2009 - Lucene Java 2.9.1 available&lt;/h3&gt;
 &lt;p&gt;
 		This release fixes bugs from 2.9.0, including one
@@ -392,7 +423,7 @@
 	        Maven artifacts are available 
 	        &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
 	      &lt;/p&gt;
-&lt;a name="N100D4"&gt;&lt;/a&gt;&lt;a name="25+September+2009+-+Lucene+Java+2.9.0+available"&gt;&lt;/a&gt;
+&lt;a name="N10104"&gt;&lt;/a&gt;&lt;a name="25+September+2009+-+Lucene+Java+2.9.0+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;25 September 2009 - Lucene Java 2.9.0 available&lt;/h3&gt;
 &lt;p&gt;
 	            This release has many improvements since release 2.4.1, including:
@@ -465,7 +496,7 @@
 	            Maven artifacts are available 
 	            &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
 	          &lt;/p&gt;
-&lt;a name="N1011D"&gt;&lt;/a&gt;&lt;a name="14+August+2009+-+Lucene+at+US+ApacheCon"&gt;&lt;/a&gt;
+&lt;a name="N1014D"&gt;&lt;/a&gt;&lt;a name="14+August+2009+-+Lucene+at+US+ApacheCon"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;14 August 2009 - Lucene at US ApacheCon&lt;/h3&gt;
 &lt;p&gt;
 	         
@@ -521,12 +552,12 @@
 &lt;a href="http://www.us.apachecon.com/c/acus2009/sessions/462"&gt;Realtime Search&lt;/a&gt;
- Jason Rutherglen @ 15:00&lt;/li&gt;
 			
 &lt;/ul&gt;
-&lt;a name="N1018D"&gt;&lt;/a&gt;&lt;a name="25+June+2009+-+Apache+Open+Relevance+Kickoff"&gt;&lt;/a&gt;
+&lt;a name="N101BD"&gt;&lt;/a&gt;&lt;a name="25+June+2009+-+Apache+Open+Relevance+Kickoff"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;25 June 2009 - Apache Open Relevance Kickoff&lt;/h3&gt;
 &lt;p&gt;The Apache Lucene PMC has officially voted to add the Open Relevance Project (ORP)
as a Lucene subproject.  ORP's main goal is to build out collections, judgments and queries
in an open environment to make it easier for Lucene developers and users to do relevance testing,
much like one would get if using &lt;a href="http://trec.nist.gov"&gt;TREC&lt;/a&gt; or
 			other evaluation conferences.&lt;/p&gt;
 &lt;p&gt;See &lt;a href="http://lucene.apache.org/openrelevance"&gt;http://lucene.apache.org/openrelevance&lt;/a&gt;
for more info&lt;/p&gt;
-&lt;a name="N101A2"&gt;&lt;/a&gt;&lt;a name="07+April+2009+-+Apache+Mahout+0.1+released"&gt;&lt;/a&gt;
+&lt;a name="N101D2"&gt;&lt;/a&gt;&lt;a name="07+April+2009+-+Apache+Mahout+0.1+released"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;07 April 2009 - Apache Mahout 0.1 released&lt;/h3&gt;
 &lt;p&gt;The Apache Lucene project is pleased to announce the release of Apache Mahout 0.1.
 			Apache Mahout is a subproject of Apache Lucene with the goal of delivering scalable
@@ -551,7 +582,7 @@
 			
 &lt;/ul&gt;
 &lt;p&gt;More info is available on the Mahout &lt;a href="http://lucene.apache.org/mahout"&gt;website&lt;/a&gt;.&lt;/p&gt;
-&lt;a name="N101C7"&gt;&lt;/a&gt;&lt;a name="9+March+2009+-+Lucene+Java+2.4.1+available"&gt;&lt;/a&gt;
+&lt;a name="N101F7"&gt;&lt;/a&gt;&lt;a name="9+March+2009+-+Lucene+Java+2.4.1+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;9 March 2009 - Lucene Java 2.4.1 available&lt;/h3&gt;
 &lt;p&gt;
                 This release contains fixes for bugs found in 2.4.0,
@@ -575,7 +606,7 @@
                 Maven artifacts are available 
                 &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
               &lt;/p&gt;
-&lt;a name="N101ED"&gt;&lt;/a&gt;&lt;a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"&gt;&lt;/a&gt;
+&lt;a name="N1021D"&gt;&lt;/a&gt;&lt;a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;09 February 2009 - Lucene at ApacheCon Europe 2009 in Amsterdam&lt;/h3&gt;
 &lt;p&gt;
 	         
@@ -613,11 +644,11 @@
 
 	        
 &lt;/ul&gt;
-&lt;a name="N10236"&gt;&lt;/a&gt;&lt;a name="19+January+2009+-+PyLucene+joins+the+Lucene+TLP"&gt;&lt;/a&gt;
+&lt;a name="N10266"&gt;&lt;/a&gt;&lt;a name="19+January+2009+-+PyLucene+joins+the+Lucene+TLP"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;19 January 2009 - PyLucene joins the Lucene TLP&lt;/h3&gt;
 &lt;p&gt;
 &lt;a href="http://lucene.apache.org/pylucene"&gt;PyLucene&lt;/a&gt;, the Python based port
of Lucene is now an official Lucene subproject.&lt;/p&gt;
-&lt;a name="N10243"&gt;&lt;/a&gt;&lt;a name="8+October+2008+-+Lucene+Java+2.4.0+available"&gt;&lt;/a&gt;
+&lt;a name="N10273"&gt;&lt;/a&gt;&lt;a name="8+October+2008+-+Lucene+Java+2.4.0+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;8 October 2008 - Lucene Java 2.4.0 available&lt;/h3&gt;
 &lt;p&gt;
             Lucene 2.4.0 is available for public download.  This version contains many enhancements
and bug fixes.  See
@@ -631,7 +662,7 @@
             Maven artifacts are available 
             &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
           &lt;/p&gt;
-&lt;a name="N1025F"&gt;&lt;/a&gt;&lt;a name="15+September+2008+-+Solr+1.3.0+Available"&gt;&lt;/a&gt;
+&lt;a name="N1028F"&gt;&lt;/a&gt;&lt;a name="15+September+2008+-+Solr+1.3.0+Available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;15 September 2008 - Solr 1.3.0 Available&lt;/h3&gt;
 &lt;p&gt;Solr 1.3.0 is available for public download.  This version contains many enhancements
and bug fixes, including distributed search capabilities,
 				Lucene 2.3.x performance improvements and many others.

Modified: lucene/site/publish/index.pdf
URL: http://svn.apache.org/viewvc/lucene/site/publish/index.pdf?rev=881778&amp;r1=881777&amp;r2=881778&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/lucene/site/src/documentation/content/xdocs/index.xml?rev=881778&amp;r1=881777&amp;r2=881778&amp;view=diff
==============================================================================
--- lucene/site/src/documentation/content/xdocs/index.xml (original)
+++ lucene/site/src/documentation/content/xdocs/index.xml Wed Nov 18 13:44:55 2009
@@ -62,6 +62,28 @@
     &lt;section&gt;
       &lt;title&gt;News&lt;/title&gt;
 	&lt;section&gt;
+        &lt;title&gt;17 Nov. 2009 - Apache Mahout 0.2 released&lt;/title&gt;
+        &lt;p&gt;The Apache Lucene project is pleased to announce the release of Apache Mahout
0.2.&lt;/p&gt;
+        &lt;p&gt;
+          Highlights include:
+        &lt;/p&gt;
+        &lt;ul&gt;
+          &lt;li&gt;Significant performance increase (and API changes) in collaborative filtering
engine&lt;/li&gt;
+          &lt;li&gt;K-nearest-neighbor and SVD recommenders&lt;/li&gt;
+          &lt;li&gt;Much code cleanup, bug fixing&lt;/li&gt;
+          &lt;li&gt;Random forests, frequent pattern mining using parallel FP growth&lt;/li&gt;
+          &lt;li&gt;Latent Dirichlet Allocation&lt;/li&gt;
+          &lt;li&gt;Updates for Hadoop 0.20.x&lt;/li&gt;
+        &lt;/ul&gt;
+        &lt;p&gt;Details on what's included can be found in the&lt;a
+            href="https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12313278&amp;amp;styleName=Html&amp;amp;projectId=12310751"&gt;
+          release notes&lt;/a&gt;.
+        &lt;/p&gt;
+        &lt;p&gt;Downloads are available from the
+          &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/mahout/"&gt;Apache Mirrors&lt;/a&gt;
+        &lt;/p&gt;
+      &lt;/section&gt;
+	&lt;section&gt;
 	   &lt;title&gt;10 November 2009 - Solr 1.4 Released&lt;/title&gt;
 	   &lt;p&gt;
 	     Solr 1.4 has been released and is now available for public &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/"&gt;download&lt;/a&gt;!




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834526 - /lucene/pylucene/tags/pylucene_2_9_1/</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091110161207.3A1712388906@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110161207-3A1712388906@eris-apache-org%3e</id>
<updated>2009-11-10T16:12:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Tue Nov 10 16:12:06 2009
New Revision: 834526

URL: http://svn.apache.org/viewvc?rev=834526&amp;view=rev
Log:
tagged 2.9.1 released

Added:
    lucene/pylucene/tags/pylucene_2_9_1/
      - copied from r834525, lucene/pylucene/branches/pylucene_2_9/



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834524 - /lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091110161110.C4738238890A@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110161110-C4738238890A@eris-apache-org%3e</id>
<updated>2009-11-10T16:11:10Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Tue Nov 10 16:11:10 2009
New Revision: 834524

URL: http://svn.apache.org/viewvc?rev=834524&amp;view=rev
Log:
release 2.4.1

Modified:
    lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES?rev=834524&amp;r1=834523&amp;r2=834524&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES Tue Nov 10 16:11:10 2009
@@ -2,9 +2,9 @@
 --------------------
  - fixed bug in code comparing setuptools versions when &gt;= 0.6c10
  - verified build against setuptools from distribute 0.6.6
+ - verified build against setuptools 0.6c11
  - renamed patch.43 to differentiate setuptools versions
  - fixed bug with iterator_next templates using return class != Object
- - 
 
 Version 2.3 -&gt; 2.4
 ------------------




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834509 - in /lucene/site: publish/index.html publish/index.pdf publish/skin/README.txt publish/skin/tigris.js src/documentation/content/xdocs/index.xml</title>
<author><name>gsingers@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091110154245.B4BEA2388901@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110154245-B4BEA2388901@eris-apache-org%3e</id>
<updated>2009-11-10T15:42:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: gsingers
Date: Tue Nov 10 15:42:45 2009
New Revision: 834509

URL: http://svn.apache.org/viewvc?rev=834509&amp;view=rev
Log:
solr announcement

Added:
    lucene/site/publish/skin/README.txt   (with props)
    lucene/site/publish/skin/tigris.js   (with props)
Modified:
    lucene/site/publish/index.html
    lucene/site/publish/index.pdf
    lucene/site/src/documentation/content/xdocs/index.xml

Modified: lucene/site/publish/index.html
URL: http://svn.apache.org/viewvc/lucene/site/publish/index.html?rev=834509&amp;r1=834508&amp;r2=834509&amp;view=diff
==============================================================================
--- lucene/site/publish/index.html (original)
+++ lucene/site/publish/index.html Tue Nov 10 15:42:45 2009
@@ -214,6 +214,9 @@
 &lt;a href="#News"&gt;News&lt;/a&gt;
 &lt;ul class="minitoc"&gt;
 &lt;li&gt;
+&lt;a href="#10+November+2009+-+Solr+1.4+Released"&gt;10 November 2009 - Solr 1.4 Released&lt;/a&gt;
+&lt;/li&gt;
+&lt;li&gt;
 &lt;a href="#6+November+2009+-+Lucene+Java+2.9.1+available"&gt;6 November 2009 - Lucene Java
2.9.1 available&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
@@ -319,7 +322,39 @@
 &lt;a name="N10076"&gt;&lt;/a&gt;&lt;a name="News"&gt;&lt;/a&gt;
 &lt;h2 class="h3"&gt;News&lt;/h2&gt;
 &lt;div class="section"&gt;
-&lt;a name="N1007C"&gt;&lt;/a&gt;&lt;a name="6+November+2009+-+Lucene+Java+2.9.1+available"&gt;&lt;/a&gt;
+&lt;a name="N1007C"&gt;&lt;/a&gt;&lt;a name="10+November+2009+-+Solr+1.4+Released"&gt;&lt;/a&gt;
+&lt;h3 class="h4"&gt;10 November 2009 - Solr 1.4 Released&lt;/h3&gt;
+&lt;p&gt;
+	     Solr 1.4 has been released and is now available for public &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/"&gt;download&lt;/a&gt;!
+
+	   New Solr 1.4 features include
+	 &lt;/p&gt;
+&lt;ul&gt;
+	    
+&lt;li&gt;Major performance enhancements in indexing, searching, and faceting&lt;/li&gt;
+	    
+&lt;li&gt;Revamped all-Java index replication that's simple to configure and
+	        can replicate config files&lt;/li&gt;
+	    
+&lt;li&gt;Greatly improved database integration via the DataImportHandler&lt;/li&gt;
+	    
+&lt;li&gt;Rich document processing (Word, PDF, HTML) via Apache Tika&lt;/li&gt;
+	    
+&lt;li&gt;Dynamic search results clustering via Carrot2&lt;/li&gt;
+	    
+&lt;li&gt;Multi-select faceting (support for multiple items in a single
+	        category to be selected)&lt;/li&gt;
+	    
+&lt;li&gt;Many powerful query enhancements, including ranges over arbitrary
+	        functions, nested queries of different syntaxes&lt;/li&gt;
+	    
+&lt;li&gt;Many other plugins including Terms for auto-suggest, Statistics,
+	        TermVectors, Deduplication&lt;/li&gt;
+	  
+&lt;/ul&gt;
+&lt;p&gt;See the &lt;a href="http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.4.0/CHANGES.txt"&gt;release
notes&lt;/a&gt; for more details.
+	 &lt;/p&gt;
+&lt;a name="N100AC"&gt;&lt;/a&gt;&lt;a name="6+November+2009+-+Lucene+Java+2.9.1+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;6 November 2009 - Lucene Java 2.9.1 available&lt;/h3&gt;
 &lt;p&gt;
 		This release fixes bugs from 2.9.0, including one
@@ -357,7 +392,7 @@
 	        Maven artifacts are available 
 	        &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
 	      &lt;/p&gt;
-&lt;a name="N100A4"&gt;&lt;/a&gt;&lt;a name="25+September+2009+-+Lucene+Java+2.9.0+available"&gt;&lt;/a&gt;
+&lt;a name="N100D4"&gt;&lt;/a&gt;&lt;a name="25+September+2009+-+Lucene+Java+2.9.0+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;25 September 2009 - Lucene Java 2.9.0 available&lt;/h3&gt;
 &lt;p&gt;
 	            This release has many improvements since release 2.4.1, including:
@@ -430,7 +465,7 @@
 	            Maven artifacts are available 
 	            &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
 	          &lt;/p&gt;
-&lt;a name="N100ED"&gt;&lt;/a&gt;&lt;a name="14+August+2009+-+Lucene+at+US+ApacheCon"&gt;&lt;/a&gt;
+&lt;a name="N1011D"&gt;&lt;/a&gt;&lt;a name="14+August+2009+-+Lucene+at+US+ApacheCon"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;14 August 2009 - Lucene at US ApacheCon&lt;/h3&gt;
 &lt;p&gt;
 	         
@@ -486,12 +521,12 @@
 &lt;a href="http://www.us.apachecon.com/c/acus2009/sessions/462"&gt;Realtime Search&lt;/a&gt;
- Jason Rutherglen @ 15:00&lt;/li&gt;
 			
 &lt;/ul&gt;
-&lt;a name="N1015D"&gt;&lt;/a&gt;&lt;a name="25+June+2009+-+Apache+Open+Relevance+Kickoff"&gt;&lt;/a&gt;
+&lt;a name="N1018D"&gt;&lt;/a&gt;&lt;a name="25+June+2009+-+Apache+Open+Relevance+Kickoff"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;25 June 2009 - Apache Open Relevance Kickoff&lt;/h3&gt;
 &lt;p&gt;The Apache Lucene PMC has officially voted to add the Open Relevance Project (ORP)
as a Lucene subproject.  ORP's main goal is to build out collections, judgments and queries
in an open environment to make it easier for Lucene developers and users to do relevance testing,
much like one would get if using &lt;a href="http://trec.nist.gov"&gt;TREC&lt;/a&gt; or
 			other evaluation conferences.&lt;/p&gt;
 &lt;p&gt;See &lt;a href="http://lucene.apache.org/openrelevance"&gt;http://lucene.apache.org/openrelevance&lt;/a&gt;
for more info&lt;/p&gt;
-&lt;a name="N10172"&gt;&lt;/a&gt;&lt;a name="07+April+2009+-+Apache+Mahout+0.1+released"&gt;&lt;/a&gt;
+&lt;a name="N101A2"&gt;&lt;/a&gt;&lt;a name="07+April+2009+-+Apache+Mahout+0.1+released"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;07 April 2009 - Apache Mahout 0.1 released&lt;/h3&gt;
 &lt;p&gt;The Apache Lucene project is pleased to announce the release of Apache Mahout 0.1.
 			Apache Mahout is a subproject of Apache Lucene with the goal of delivering scalable
@@ -516,7 +551,7 @@
 			
 &lt;/ul&gt;
 &lt;p&gt;More info is available on the Mahout &lt;a href="http://lucene.apache.org/mahout"&gt;website&lt;/a&gt;.&lt;/p&gt;
-&lt;a name="N10197"&gt;&lt;/a&gt;&lt;a name="9+March+2009+-+Lucene+Java+2.4.1+available"&gt;&lt;/a&gt;
+&lt;a name="N101C7"&gt;&lt;/a&gt;&lt;a name="9+March+2009+-+Lucene+Java+2.4.1+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;9 March 2009 - Lucene Java 2.4.1 available&lt;/h3&gt;
 &lt;p&gt;
                 This release contains fixes for bugs found in 2.4.0,
@@ -540,7 +575,7 @@
                 Maven artifacts are available 
                 &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
               &lt;/p&gt;
-&lt;a name="N101BD"&gt;&lt;/a&gt;&lt;a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"&gt;&lt;/a&gt;
+&lt;a name="N101ED"&gt;&lt;/a&gt;&lt;a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;09 February 2009 - Lucene at ApacheCon Europe 2009 in Amsterdam&lt;/h3&gt;
 &lt;p&gt;
 	         
@@ -578,11 +613,11 @@
 
 	        
 &lt;/ul&gt;
-&lt;a name="N10206"&gt;&lt;/a&gt;&lt;a name="19+January+2009+-+PyLucene+joins+the+Lucene+TLP"&gt;&lt;/a&gt;
+&lt;a name="N10236"&gt;&lt;/a&gt;&lt;a name="19+January+2009+-+PyLucene+joins+the+Lucene+TLP"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;19 January 2009 - PyLucene joins the Lucene TLP&lt;/h3&gt;
 &lt;p&gt;
 &lt;a href="http://lucene.apache.org/pylucene"&gt;PyLucene&lt;/a&gt;, the Python based port
of Lucene is now an official Lucene subproject.&lt;/p&gt;
-&lt;a name="N10213"&gt;&lt;/a&gt;&lt;a name="8+October+2008+-+Lucene+Java+2.4.0+available"&gt;&lt;/a&gt;
+&lt;a name="N10243"&gt;&lt;/a&gt;&lt;a name="8+October+2008+-+Lucene+Java+2.4.0+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;8 October 2008 - Lucene Java 2.4.0 available&lt;/h3&gt;
 &lt;p&gt;
             Lucene 2.4.0 is available for public download.  This version contains many enhancements
and bug fixes.  See
@@ -596,7 +631,7 @@
             Maven artifacts are available 
             &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
           &lt;/p&gt;
-&lt;a name="N1022F"&gt;&lt;/a&gt;&lt;a name="15+September+2008+-+Solr+1.3.0+Available"&gt;&lt;/a&gt;
+&lt;a name="N1025F"&gt;&lt;/a&gt;&lt;a name="15+September+2008+-+Solr+1.3.0+Available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;15 September 2008 - Solr 1.3.0 Available&lt;/h3&gt;
 &lt;p&gt;Solr 1.3.0 is available for public download.  This version contains many enhancements
and bug fixes, including distributed search capabilities,
 				Lucene 2.3.x performance improvements and many others.

Modified: lucene/site/publish/index.pdf
URL: http://svn.apache.org/viewvc/lucene/site/publish/index.pdf?rev=834509&amp;r1=834508&amp;r2=834509&amp;view=diff
==============================================================================
Binary files - no diff available.

Added: lucene/site/publish/skin/README.txt
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/README.txt?rev=834509&amp;view=auto
==============================================================================
--- lucene/site/publish/skin/README.txt (added)
+++ lucene/site/publish/skin/README.txt Tue Nov 10 15:42:45 2009
@@ -0,0 +1,19 @@
+The base for this skin is http://style.tigris.org/
+
+Got style-1.1.zip from http://style.tigris.org/servlets/ProjectDocumentList
+Which provides:
+images/*.gif ... we added a few of our own icons (pdfdoc, printer, xmldoc).
+css/*.css ... we added forrest.css.xslt and quirks.css (not sure where
+the quirks.css came from - it is not in the tigris dist).
+
+We made some changes to the CSS (evidently these should go into
+the inst.css - but not sure how) ...
+
+tigris.css
+ added: img { border: 0; }
+ changed: for each image url(), removed the "../"
+ changed: "inline-block" to "inline" at line 709 (fixes CSS validation error)
+ added: .pdflink .xmllink .podlink .printlink
+ added: .txtlink
+ added: .footerLogos
+

Propchange: lucene/site/publish/skin/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lucene/site/publish/skin/tigris.js
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/tigris.js?rev=834509&amp;view=auto
==============================================================================
--- lucene/site/publish/skin/tigris.js (added)
+++ lucene/site/publish/skin/tigris.js Tue Nov 10 15:42:45 2009
@@ -0,0 +1,77 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+// Write the Netscape 4-specific stylesheet.
+if (document.layers) {
+  document.writeln('&lt;link rel="stylesheet" type="text/css" href="http://style.tigris.org/nonav/css/ns4_only.css"
media="screen" /&gt;')
+}
+
+
+// Focus on user name input (the "loginform.loginID" field).
+function focus() {
+  if (document.loginform) {
+    document.loginform.loginID.focus();
+  }
+}
+
+/* Open popup widows of (mostly) predetermined types.
+
+   windowURL -- The URL to load in the new browser window.
+   type -- The (predetermined) type of window to launch.
+           acceptable values for type:
+           1: a help window
+           2: a 400x400 window
+           3: Issuezilla assignable users popup window
+           ... and you can hard code others yourself inside the function.
+   atts -- (optional) If the window you wish to create is unique and you do
+           not want to set up a "type" for it, or if you want to pass
+           additional attributes for a certain "type", you can pass its
+           attributes directly to the function via this parameter.
+*/
+
+var tigrisPopupCounter = 0;
+
+function launch(windowURL, type, atts) {
+  tigrisPopupCounter += 1;
+
+  var windowName = 'SourceCast' + type;
+  if (atts) {
+    windowName += tigrisPopupCounter;
+  }
+
+  var windowAttributes;
+  if (type == 1) {
+    windowAttributes = 'resizable=yes,left=10,top=10,screenX=12,screenY=12,height=485,width=724,status=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes'
+  }
+  else if (type == 2) {
+    windowAttributes = 'resizable=yes,left=10,top=10,screenX=12,screenY=12,height=400,width=400';
+  }
+  else if (type == 3) {
+   windowAttributes = 'resizable=yes,left=10,top=10,screenX=12,screenY=12,height=440,width=600,scrollbars=yes';

+  }
+  if (atts) {
+    windowAttributes += ',' + atts;
+  }
+
+  var windowObj = window.open(windowURL, windowName, windowAttributes);
+
+  if (windowObj) {
+    return false;
+  }
+  else {
+    return true;
+  }
+}

Propchange: lucene/site/publish/skin/tigris.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/site/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/lucene/site/src/documentation/content/xdocs/index.xml?rev=834509&amp;r1=834508&amp;r2=834509&amp;view=diff
==============================================================================
--- lucene/site/src/documentation/content/xdocs/index.xml (original)
+++ lucene/site/src/documentation/content/xdocs/index.xml Tue Nov 10 15:42:45 2009
@@ -61,6 +61,32 @@
 
     &lt;section&gt;
       &lt;title&gt;News&lt;/title&gt;
+	&lt;section&gt;
+	   &lt;title&gt;10 November 2009 - Solr 1.4 Released&lt;/title&gt;
+	   &lt;p&gt;
+	     Solr 1.4 has been released and is now available for public &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/"&gt;download&lt;/a&gt;!
+
+	   New Solr 1.4 features include
+	 &lt;/p&gt;
+	  &lt;ul&gt;
+	    &lt;li&gt;Major performance enhancements in indexing, searching, and faceting&lt;/li&gt;
+	    &lt;li&gt;Revamped all-Java index replication that's simple to configure and
+	        can replicate config files&lt;/li&gt;
+	    &lt;li&gt;Greatly improved database integration via the DataImportHandler&lt;/li&gt;
+	    &lt;li&gt;Rich document processing (Word, PDF, HTML) via Apache Tika&lt;/li&gt;
+	    &lt;li&gt;Dynamic search results clustering via Carrot2&lt;/li&gt;
+	    &lt;li&gt;Multi-select faceting (support for multiple items in a single
+	        category to be selected)&lt;/li&gt;
+	    &lt;li&gt;Many powerful query enhancements, including ranges over arbitrary
+	        functions, nested queries of different syntaxes&lt;/li&gt;
+	    &lt;li&gt;Many other plugins including Terms for auto-suggest, Statistics,
+	        TermVectors, Deduplication&lt;/li&gt;
+	  &lt;/ul&gt;
+
+		&lt;p&gt;See the &lt;a href="http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.4.0/CHANGES.txt"&gt;release
notes&lt;/a&gt; for more details.
+	 &lt;/p&gt;
+
+	&lt;/section&gt;
            &lt;section&gt;
               &lt;title&gt;6 November 2009 - Lucene Java 2.9.1 available&lt;/title&gt;
               &lt;p&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833674 - in /lucene/site: publish/index.html publish/index.pdf src/documentation/content/xdocs/index.xml</title>
<author><name>mikemccand@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091107111809.5F6FD23888DD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091107111809-5F6FD23888DD@eris-apache-org%3e</id>
<updated>2009-11-07T11:18:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: mikemccand
Date: Sat Nov  7 11:18:08 2009
New Revision: 833674

URL: http://svn.apache.org/viewvc?rev=833674&amp;view=rev
Log:
2.9.1 release

Modified:
    lucene/site/publish/index.html
    lucene/site/publish/index.pdf
    lucene/site/src/documentation/content/xdocs/index.xml

Modified: lucene/site/publish/index.html
URL: http://svn.apache.org/viewvc/lucene/site/publish/index.html?rev=833674&amp;r1=833673&amp;r2=833674&amp;view=diff
==============================================================================
--- lucene/site/publish/index.html (original)
+++ lucene/site/publish/index.html Sat Nov  7 11:18:08 2009
@@ -214,6 +214,9 @@
 &lt;a href="#News"&gt;News&lt;/a&gt;
 &lt;ul class="minitoc"&gt;
 &lt;li&gt;
+&lt;a href="#6+November+2009+-+Lucene+Java+2.9.1+available"&gt;6 November 2009 - Lucene Java
2.9.1 available&lt;/a&gt;
+&lt;/li&gt;
+&lt;li&gt;
 &lt;a href="#25+September+2009+-+Lucene+Java+2.9.0+available"&gt;25 September 2009 - Lucene
Java 2.9.0 available&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
@@ -316,7 +319,45 @@
 &lt;a name="N10076"&gt;&lt;/a&gt;&lt;a name="News"&gt;&lt;/a&gt;
 &lt;h2 class="h3"&gt;News&lt;/h2&gt;
 &lt;div class="section"&gt;
-&lt;a name="N1007C"&gt;&lt;/a&gt;&lt;a name="25+September+2009+-+Lucene+Java+2.9.0+available"&gt;&lt;/a&gt;
+&lt;a name="N1007C"&gt;&lt;/a&gt;&lt;a name="6+November+2009+-+Lucene+Java+2.9.1+available"&gt;&lt;/a&gt;
+&lt;h3 class="h4"&gt;6 November 2009 - Lucene Java 2.9.1 available&lt;/h3&gt;
+&lt;p&gt;
+		This release fixes bugs from 2.9.0, including one
+		serious bug whereby BooleanQuery could silently fail
+		to retrieve certain matching documents.
+	      &lt;/p&gt;
+&lt;p&gt;
+		There are also some minor API changes, including a
+		Version parameter added to QueryParser and contrib
+		Analyzers, so that version dependent defaults are
+		consistent across classes, as well as un-deprecating
+		of certain methods (we were too zealous in a few
+		cases!).
+	      &lt;/p&gt;
+&lt;p&gt;
+		Otherwise the changes are all bug fixes and
+		documentation improvements.
+	      &lt;/p&gt;
+&lt;p&gt;
+		This release is fully compatible with 2.9.0.  We
+		strongly recommend upgrading to 2.9.1 if you are using
+		2.9.0.  Furthermore, because some additional APIs were
+		deprecated in 2.9.1, to ensure a clean ("JAR drop in")
+		upgrade to 3.0 you'll need to ensure your code
+		compiles against 2.9.1 without deprecation warnings.
+	      &lt;/p&gt;
+&lt;p&gt;
+	        See &lt;a href="http://lucene.apache.org/java/2_9_1/changes/Changes.html"&gt;CHANGES&lt;/a&gt;
for details.
+	      &lt;/p&gt;
+&lt;p&gt;
+	        Binary and source distributions are available
+	        &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/java/"&gt;here&lt;/a&gt;.
+	      &lt;/p&gt;
+&lt;p&gt;
+	        Maven artifacts are available 
+	        &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
+	      &lt;/p&gt;
+&lt;a name="N100A4"&gt;&lt;/a&gt;&lt;a name="25+September+2009+-+Lucene+Java+2.9.0+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;25 September 2009 - Lucene Java 2.9.0 available&lt;/h3&gt;
 &lt;p&gt;
 	            This release has many improvements since release 2.4.1, including:
@@ -377,7 +418,7 @@
                 of CHANGES.
                 
                 We recommend that you recompile your application with Lucene 2.9
-                rather than attempting to &amp;ldquo;drop&amp;rdquo; it in. This will alert
you to any
+                rather than attempting to drop it in. This will alert you to any
                 issues you may have to fix if you are affected by one of the backward
                 compatibility breaks. 
 	          &lt;/p&gt;
@@ -389,7 +430,7 @@
 	            Maven artifacts are available 
 	            &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
 	          &lt;/p&gt;
-&lt;a name="N100C5"&gt;&lt;/a&gt;&lt;a name="14+August+2009+-+Lucene+at+US+ApacheCon"&gt;&lt;/a&gt;
+&lt;a name="N100ED"&gt;&lt;/a&gt;&lt;a name="14+August+2009+-+Lucene+at+US+ApacheCon"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;14 August 2009 - Lucene at US ApacheCon&lt;/h3&gt;
 &lt;p&gt;
 	         
@@ -445,12 +486,12 @@
 &lt;a href="http://www.us.apachecon.com/c/acus2009/sessions/462"&gt;Realtime Search&lt;/a&gt;
- Jason Rutherglen @ 15:00&lt;/li&gt;
 			
 &lt;/ul&gt;
-&lt;a name="N10135"&gt;&lt;/a&gt;&lt;a name="25+June+2009+-+Apache+Open+Relevance+Kickoff"&gt;&lt;/a&gt;
+&lt;a name="N1015D"&gt;&lt;/a&gt;&lt;a name="25+June+2009+-+Apache+Open+Relevance+Kickoff"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;25 June 2009 - Apache Open Relevance Kickoff&lt;/h3&gt;
 &lt;p&gt;The Apache Lucene PMC has officially voted to add the Open Relevance Project (ORP)
as a Lucene subproject.  ORP's main goal is to build out collections, judgments and queries
in an open environment to make it easier for Lucene developers and users to do relevance testing,
much like one would get if using &lt;a href="http://trec.nist.gov"&gt;TREC&lt;/a&gt; or
 			other evaluation conferences.&lt;/p&gt;
 &lt;p&gt;See &lt;a href="http://lucene.apache.org/openrelevance"&gt;http://lucene.apache.org/openrelevance&lt;/a&gt;
for more info&lt;/p&gt;
-&lt;a name="N1014A"&gt;&lt;/a&gt;&lt;a name="07+April+2009+-+Apache+Mahout+0.1+released"&gt;&lt;/a&gt;
+&lt;a name="N10172"&gt;&lt;/a&gt;&lt;a name="07+April+2009+-+Apache+Mahout+0.1+released"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;07 April 2009 - Apache Mahout 0.1 released&lt;/h3&gt;
 &lt;p&gt;The Apache Lucene project is pleased to announce the release of Apache Mahout 0.1.
 			Apache Mahout is a subproject of Apache Lucene with the goal of delivering scalable
@@ -475,7 +516,7 @@
 			
 &lt;/ul&gt;
 &lt;p&gt;More info is available on the Mahout &lt;a href="http://lucene.apache.org/mahout"&gt;website&lt;/a&gt;.&lt;/p&gt;
-&lt;a name="N1016F"&gt;&lt;/a&gt;&lt;a name="9+March+2009+-+Lucene+Java+2.4.1+available"&gt;&lt;/a&gt;
+&lt;a name="N10197"&gt;&lt;/a&gt;&lt;a name="9+March+2009+-+Lucene+Java+2.4.1+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;9 March 2009 - Lucene Java 2.4.1 available&lt;/h3&gt;
 &lt;p&gt;
                 This release contains fixes for bugs found in 2.4.0,
@@ -499,7 +540,7 @@
                 Maven artifacts are available 
                 &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
               &lt;/p&gt;
-&lt;a name="N10195"&gt;&lt;/a&gt;&lt;a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"&gt;&lt;/a&gt;
+&lt;a name="N101BD"&gt;&lt;/a&gt;&lt;a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;09 February 2009 - Lucene at ApacheCon Europe 2009 in Amsterdam&lt;/h3&gt;
 &lt;p&gt;
 	         
@@ -537,11 +578,11 @@
 
 	        
 &lt;/ul&gt;
-&lt;a name="N101DE"&gt;&lt;/a&gt;&lt;a name="19+January+2009+-+PyLucene+joins+the+Lucene+TLP"&gt;&lt;/a&gt;
+&lt;a name="N10206"&gt;&lt;/a&gt;&lt;a name="19+January+2009+-+PyLucene+joins+the+Lucene+TLP"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;19 January 2009 - PyLucene joins the Lucene TLP&lt;/h3&gt;
 &lt;p&gt;
 &lt;a href="http://lucene.apache.org/pylucene"&gt;PyLucene&lt;/a&gt;, the Python based port
of Lucene is now an official Lucene subproject.&lt;/p&gt;
-&lt;a name="N101EB"&gt;&lt;/a&gt;&lt;a name="8+October+2008+-+Lucene+Java+2.4.0+available"&gt;&lt;/a&gt;
+&lt;a name="N10213"&gt;&lt;/a&gt;&lt;a name="8+October+2008+-+Lucene+Java+2.4.0+available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;8 October 2008 - Lucene Java 2.4.0 available&lt;/h3&gt;
 &lt;p&gt;
             Lucene 2.4.0 is available for public download.  This version contains many enhancements
and bug fixes.  See
@@ -555,7 +596,7 @@
             Maven artifacts are available 
             &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
           &lt;/p&gt;
-&lt;a name="N10207"&gt;&lt;/a&gt;&lt;a name="15+September+2008+-+Solr+1.3.0+Available"&gt;&lt;/a&gt;
+&lt;a name="N1022F"&gt;&lt;/a&gt;&lt;a name="15+September+2008+-+Solr+1.3.0+Available"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;15 September 2008 - Solr 1.3.0 Available&lt;/h3&gt;
 &lt;p&gt;Solr 1.3.0 is available for public download.  This version contains many enhancements
and bug fixes, including distributed search capabilities,
 				Lucene 2.3.x performance improvements and many others.

Modified: lucene/site/publish/index.pdf
URL: http://svn.apache.org/viewvc/lucene/site/publish/index.pdf?rev=833674&amp;r1=833673&amp;r2=833674&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/lucene/site/src/documentation/content/xdocs/index.xml?rev=833674&amp;r1=833673&amp;r2=833674&amp;view=diff
==============================================================================
--- lucene/site/src/documentation/content/xdocs/index.xml (original)
+++ lucene/site/src/documentation/content/xdocs/index.xml Sat Nov  7 11:18:08 2009
@@ -62,6 +62,46 @@
     &lt;section&gt;
       &lt;title&gt;News&lt;/title&gt;
            &lt;section&gt;
+              &lt;title&gt;6 November 2009 - Lucene Java 2.9.1 available&lt;/title&gt;
+              &lt;p&gt;
+		This release fixes bugs from 2.9.0, including one
+		serious bug whereby BooleanQuery could silently fail
+		to retrieve certain matching documents.
+	      &lt;/p&gt;
+	      &lt;p&gt;
+		There are also some minor API changes, including a
+		Version parameter added to QueryParser and contrib
+		Analyzers, so that version dependent defaults are
+		consistent across classes, as well as un-deprecating
+		of certain methods (we were too zealous in a few
+		cases!).
+	      &lt;/p&gt;
+	      &lt;p&gt;
+		Otherwise the changes are all bug fixes and
+		documentation improvements.
+	      &lt;/p&gt;
+	      &lt;p&gt;
+		This release is fully compatible with 2.9.0.  We
+		strongly recommend upgrading to 2.9.1 if you are using
+		2.9.0.  Furthermore, because some additional APIs were
+		deprecated in 2.9.1, to ensure a clean ("JAR drop in")
+		upgrade to 3.0 you'll need to ensure your code
+		compiles against 2.9.1 without deprecation warnings.
+	      &lt;/p&gt;
+	      &lt;p&gt;
+	        See &lt;a href="http://lucene.apache.org/java/2_9_1/changes/Changes.html"&gt;CHANGES&lt;/a&gt;
for details.
+	      &lt;/p&gt;
+	      &lt;p&gt;
+	        Binary and source distributions are available
+	        &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/java/"&gt;here&lt;/a&gt;.
+	      &lt;/p&gt;
+	      &lt;p&gt;
+	        Maven artifacts are available 
+	        &lt;a href="http://repo1.maven.org/maven2/org/apache/lucene/"&gt;here&lt;/a&gt;.
+	      &lt;/p&gt;
+           &lt;/section&gt;
+      
+	   &lt;section&gt;
               &lt;title&gt;25 September 2009 - Lucene Java 2.9.0 available&lt;/title&gt;
               &lt;p&gt;
 	            This release has many improvements since release 2.4.1, including:
@@ -109,7 +149,7 @@
                 of CHANGES.
                 
                 We recommend that you recompile your application with Lucene 2.9
-                rather than attempting to âdropâ it in. This will alert you to
any
+                rather than attempting to drop it in. This will alert you to any
                 issues you may have to fix if you are affected by one of the backward
                 compatibility breaks. 
 	          &lt;/p&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833648 - in /lucene/pylucene/branches/pylucene_2_9: CHANGES INSTALL Makefile</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091107075755.2A5062388A53@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091107075755-2A5062388A53@eris-apache-org%3e</id>
<updated>2009-11-07T07:57:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Sat Nov  7 07:57:54 2009
New Revision: 833648

URL: http://svn.apache.org/viewvc?rev=833648&amp;view=rev
Log:
PyLucene 2.9.1

Modified:
    lucene/pylucene/branches/pylucene_2_9/CHANGES
    lucene/pylucene/branches/pylucene_2_9/INSTALL
    lucene/pylucene/branches/pylucene_2_9/Makefile

Modified: lucene/pylucene/branches/pylucene_2_9/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/CHANGES?rev=833648&amp;r1=833647&amp;r2=833648&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_2_9/CHANGES Sat Nov  7 07:57:54 2009
@@ -1,4 +1,9 @@
 
+Version 2.9.0 -&gt; 2.9.1
+----------------------
+ - Lucene Java sources now included in PyLucene source distribution
+ - PyLucene built with JCC 2.4.1
+
 Version 2.4.1 -&gt; 2.9.0
 ----------------------
  - renamed the Highlighter's SpanScorer class to HighlighterSpanScorer

Modified: lucene/pylucene/branches/pylucene_2_9/INSTALL
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/INSTALL?rev=833648&amp;r1=833647&amp;r2=833648&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/INSTALL (original)
+++ lucene/pylucene/branches/pylucene_2_9/INSTALL Sat Nov  7 07:57:54 2009
@@ -1,2 +1,3 @@
 
-Please see doc/documentation/install.html
+Please see doc/documentation/install.html or
+http://lucene.apache.org/pylucene/documentation/install.html

Modified: lucene/pylucene/branches/pylucene_2_9/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/Makefile?rev=833648&amp;r1=833647&amp;r2=833648&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/Makefile (original)
+++ lucene/pylucene/branches/pylucene_2_9/Makefile Sat Nov  7 07:57:54 2009
@@ -14,10 +14,10 @@
 # site-packages directory.
 #
 
-VERSION=2.9.0-1
+VERSION=2.9.1-1
 LUCENE_SVN_VER=HEAD
-LUCENE_VER=2.9.0
-LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/tags/lucene_2_9_0
+LUCENE_VER=2.9.1
+LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/tags/lucene_2_9_1
 PYLUCENE:=$(shell pwd)
 LUCENE=lucene-java-$(LUCENE_VER)
 
@@ -170,16 +170,14 @@
 $(ANALYZERS_JAR): $(LUCENE_JAR)
 	cd $(LUCENE)/contrib/analyzers/common; $(ANT) -Dversion=$(LUCENE_VER)
 
-$(HIGHLIGHTER_JAR): $(LUCENE_JAR)
-	cd $(LUCENE)/contrib/highlighter; $(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)
 
-$(REGEX_JAR): $(LUCENE_JAR)
-	rm -f $(LUCENE)/contrib/regex/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java
-	rm -f $(LUCENE)/contrib/regex/src/java/org/apache/regexp/RegexpTunnel.java
-	cd $(LUCENE)/contrib/regex; $(ANT) -Dversion=$(LUCENE_VER)
+$(HIGHLIGHTER_JAR): $(LUCENE_JAR)
+	cd $(LUCENE)/contrib/highlighter; $(ANT) -Dversion=$(LUCENE_VER)
 
 $(QUERIES_JAR): $(LUCENE_JAR)
 	cd $(LUCENE)/contrib/queries; $(ANT) -Dversion=$(LUCENE_VER)
@@ -191,8 +189,8 @@
 	$(ANT) -f extensions.xml -Dlucene.dir=$(LUCENE)
 
 JARS=$(LUCENE_JAR) $(SNOWBALL_JAR) $(ANALYZERS_JAR) \
-     $(HIGHLIGHTER_JAR) $(MEMORY_JAR) \
-     $(REGEX_JAR) $(QUERIES_JAR) $(INSTANTIATED_JAR) $(EXTENSIONS_JAR)
+     $(REGEX_JAR) $(MEMORY_JAR) $(HIGHLIGHTER_JAR) \
+     $(QUERIES_JAR) $(INSTANTIATED_JAR) $(EXTENSIONS_JAR)
 
 
 jars: $(JARS)
@@ -210,6 +208,8 @@
            --exclude org.apache.lucene.queryParser.TokenMgrError \
            --exclude org.apache.lucene.queryParser.QueryParserTokenManager \
            --exclude org.apache.lucene.queryParser.ParseException \
+           --exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities \
+           --exclude org.apache.regexp.RegexpTunnel \
            --python lucene \
            --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/lang/String;'
\
            --mapping java.util.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;'
\
@@ -266,6 +266,7 @@
 distrib:
 	mkdir -p distrib
 	svn export . distrib/pylucene-$(VERSION)
+	tar -cf - --exclude build $(LUCENE) | tar -C distrib/pylucene-$(VERSION) -xvf -
 	mkdir distrib/pylucene-$(VERSION)/doc
 	tar -C $(SITE) -cf - . | tar -C distrib/pylucene-$(VERSION)/doc -xvf -
 	cd distrib; tar -cvzf $(ARCHIVE) pylucene-$(VERSION)




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833641 - in /lucene/pylucene/trunk: ./ java/org/apache/pylucene/search/ jcc/ jcc/jcc/ test/</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091107073126.E57CE238888F@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091107073126-E57CE238888F@eris-apache-org%3e</id>
<updated>2009-11-07T07:31:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Sat Nov  7 07:31:25 2009
New Revision: 833641

URL: http://svn.apache.org/viewvc?rev=833641&amp;view=rev
Log:
   - made parameterized method case a bit more robust
   - fixed bug with not skipping copy constructor in generics case
   - resolved test_Similarity failure mystery with Uwe's help

Modified:
    lucene/pylucene/trunk/CHANGES
    lucene/pylucene/trunk/INSTALL
    lucene/pylucene/trunk/Makefile
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarity.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarityDelegator.java
    lucene/pylucene/trunk/jcc/INSTALL
    lucene/pylucene/trunk/jcc/jcc/cpp.py
    lucene/pylucene/trunk/jcc/jcc/python.py
    lucene/pylucene/trunk/jcc/setup.py
    lucene/pylucene/trunk/test/test_Similarity.py

Modified: lucene/pylucene/trunk/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/CHANGES?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/CHANGES (original)
+++ lucene/pylucene/trunk/CHANGES Sat Nov  7 07:31:25 2009
@@ -4,6 +4,7 @@
  - unit tests ported to new API
  - removed InstantiatedIndex contrib from default build
  - with (partial) JCC Java generics support, a lot less downcasting is needed
+ - Java Lucene sources now included in PyLucene source distribution
  - 
 
 Version 2.4.1 -&gt; 2.9.0

Modified: lucene/pylucene/trunk/INSTALL
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/INSTALL?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/INSTALL (original)
+++ lucene/pylucene/trunk/INSTALL Sat Nov  7 07:31:25 2009
@@ -1,2 +1,3 @@
 
-Please see doc/documentation/install.html
+Please see doc/documentation/install.html or
+http://lucene.apache.org/pylucene/documentation/install.html

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Sat Nov  7 07:31:25 2009
@@ -169,16 +169,14 @@
 $(ANALYZERS_JAR): $(LUCENE_JAR)
 	cd $(LUCENE)/contrib/analyzers/common; $(ANT) -Dversion=$(LUCENE_VER)
 
-$(HIGHLIGHTER_JAR): $(LUCENE_JAR)
-	cd $(LUCENE)/contrib/highlighter; $(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)
 
-$(REGEX_JAR): $(LUCENE_JAR)
-	rm -f $(LUCENE)/contrib/regex/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java
-	rm -f $(LUCENE)/contrib/regex/src/java/org/apache/regexp/RegexpTunnel.java
-	cd $(LUCENE)/contrib/regex; $(ANT) -Dversion=$(LUCENE_VER)
+$(HIGHLIGHTER_JAR): $(LUCENE_JAR)
+	cd $(LUCENE)/contrib/highlighter; $(ANT) -Dversion=$(LUCENE_VER)
 
 $(QUERIES_JAR): $(LUCENE_JAR)
 	cd $(LUCENE)/contrib/queries; $(ANT) -Dversion=$(LUCENE_VER)
@@ -187,8 +185,8 @@
 	$(ANT) -f extensions.xml -Dlucene.dir=$(LUCENE)
 
 JARS=$(LUCENE_JAR) $(SNOWBALL_JAR) $(ANALYZERS_JAR) \
-     $(HIGHLIGHTER_JAR) $(MEMORY_JAR) \
-     $(REGEX_JAR) $(QUERIES_JAR) $(EXTENSIONS_JAR)
+     $(REGEX_JAR) $(MEMORY_JAR) $(HIGHLIGHTER_JAR) $(QUERIES_JAR) \
+     $(EXTENSIONS_JAR)
 
 
 jars: $(JARS)
@@ -207,10 +205,11 @@
            --exclude org.apache.lucene.queryParser.TokenMgrError \
            --exclude org.apache.lucene.queryParser.QueryParserTokenManager \
            --exclude org.apache.lucene.queryParser.ParseException \
+           --exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities \
+           --exclude org.apache.regexp.RegexpTunnel \
            --python lucene \
            --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/lang/String;'
\
            --mapping java.util.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;'
\
-           --sequence org.apache.lucene.search.Hits 'length:()I' 'doc:(I)Lorg/apache/lucene/document/Document;'
\
            --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer \
            --version $(LUCENE_VER) \
            --module python/collections.py \
@@ -254,7 +253,7 @@
 
 test: install-test samples/LuceneInAction/index
 	find test -name 'test_*.py' | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
-	ls samples/LuceneInAction/*Test.py | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
+#	ls samples/LuceneInAction/*Test.py | PYTHONPATH=$(BUILD_TEST) xargs -t -n 1 $(PYTHON)
 
 
 ARCHIVE=pylucene-$(VERSION)-src.tar.gz
@@ -263,6 +262,7 @@
 distrib:
 	mkdir -p distrib
 	svn export . distrib/pylucene-$(VERSION)
+	tar -cf - --exclude build $(LUCENE) | tar -C distrib/pylucene-$(VERSION) -xvf -
 	mkdir distrib/pylucene-$(VERSION)/doc
 	tar -C $(SITE) -cf - . | tar -C distrib/pylucene-$(VERSION)/doc -xvf -
 	cd distrib; tar -cvzf $(ARCHIVE) pylucene-$(VERSION)

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarity.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarity.java?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarity.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarity.java Sat Nov  7
07:31:25 2009
@@ -17,6 +17,7 @@
 
 import org.apache.lucene.search.Similarity;
 import org.apache.lucene.search.Searcher;
+import org.apache.lucene.search.Explanation.IDFExplanation;
 import org.apache.lucene.index.Term;
 import java.util.Collection;
 
@@ -44,23 +45,35 @@
         pythonDecRef();
     }
 
+    public IDFExplanation idfExplain(final Collection&lt;Term&gt; terms,
+                                     final Searcher searcher)
+    {
+        return new IDFExplanation() {
+            public float getIdf()
+            {
+                return idfTerms(terms, searcher);
+            }
+
+            public String explain()
+            {
+                return null;
+            }
+        };
+    }
+
     public native void pythonDecRef();
-    public native float coord(int overlap, int maxOverlap);
-    public native float idfTerm(Term term, Searcher searcher);
+
     public native float idfTerms(Collection terms, Searcher searcher);
+
+    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 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);
 
-    public float idf(Term term, Searcher searcher)
-    {
-        return idfTerm(term, searcher);
-    }
-
-    public float idf(Collection terms, Searcher searcher)
-    {
-        return idfTerms(terms, searcher);
-    }
+    
 }

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarityDelegator.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarityDelegator.java?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarityDelegator.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSimilarityDelegator.java Sat
Nov  7 07:31:25 2009
@@ -52,6 +52,7 @@
     public native float sloppyFreq(int distance);
     public native float idf(int docFreq, int numDocs);
     public native float coord(int overlap, int maxOverlap);
-    public native float scorePayload(String fieldName, byte[] payload,
+    public native float scorePayload(int docId, String fieldName,
+                                     int start, int end, byte [] payload,
                                      int offset, int length);
 }

Modified: lucene/pylucene/trunk/jcc/INSTALL
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/INSTALL?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/INSTALL (original)
+++ lucene/pylucene/trunk/jcc/INSTALL Sat Nov  7 07:31:25 2009
@@ -1,2 +1,3 @@
 
-Please see doc/jcc/documentation/install.html
+Please see doc/jcc/documentation/install.html or
+http://lucene.apache.org/pylucene/jcc/documentation/install.html

Modified: lucene/pylucene/trunk/jcc/jcc/cpp.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/cpp.py?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/cpp.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/cpp.py Sat Nov  7 07:31:25 2009
@@ -584,10 +584,17 @@
         if Modifier.isPublic(constructor.getModifiers()):
             if generics:
                 params = constructor.getGenericParameterTypes()
+                if len(params) == 1:
+                    if params[0] == cls:
+                        continue
+                    if ParameterizedType.instance_(params[0]):
+                        param = ParameterizedType.cast_(params[0])
+                        if param.getRawType() == cls:
+                            continue
             else:
                 params = constructor.getParameterTypes()
-            if len(params) == 1 and params[0] == cls:
-                continue
+                if len(params) == 1 and params[0] == cls:
+                    continue
             for param in params:
                 if not known(param, typeset, declares, packages, excludes,
                              generics):

Modified: lucene/pylucene/trunk/jcc/jcc/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/python.py?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/python.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/python.py Sat Nov  7 07:31:25 2009
@@ -93,7 +93,7 @@
             ''.join([callarg(params[i], i) for i in xrange(len(params))]))
 
 
-def declareVars(out, indent, params, current, generics):
+def declareVars(out, indent, params, current, generics, typeParams):
 
     for i in xrange(len(params)):
         param = params[i]
@@ -105,6 +105,7 @@
                 param = param.getComponentType()
             if param.getTypeParameters():
                 line(out, indent, 'PyTypeObject **p%d;', i)
+                typeParams.add(i)
     
 
 def construct(out, indent, cls, inCase, constructor, names, generics):
@@ -114,9 +115,14 @@
         indent += 1
 
     params = constructor.getParameterTypes()
+    if generics:
+        typeParams = set()
+    else:
+        typeParams = None
+
     count = len(params)
 
-    declareVars(out, indent, params, cls, generics)
+    declareVars(out, indent, params, cls, generics, typeParams)
     line(out, indent, '%s object((jobject) NULL);', cppname(names[-1]))
 
     line(out)
@@ -179,7 +185,7 @@
     return result %(value)
 
 
-def returnValue(cls, returnType, value, genericRT=None):
+def returnValue(cls, returnType, value, genericRT=None, typeParams=None):
 
     result = RESULTS.get(returnType.getName())
     if result:
@@ -238,7 +244,7 @@
                     i += 1
             elif Method.instance_(gd):
                 for clsParam in gd.getTypeParameters():
-                    if genericRT == clsParam:
+                    if genericRT == clsParam and i in typeParams:
                         return 'return p%d != NULL &amp;&amp; p%d[0] != NULL ? wrapType(p%d[0],
%s.this$) : %s%st_%s::wrap_Object(%s);' %(i, i, i, value, ns, sep, n, value)
                     i += 1
 
@@ -258,11 +264,13 @@
     returnType = method.getReturnType()
     if generics:
         genericRT = method.getGenericReturnType()
+        typeParams = set()
     else:
         genericRT = None
+        typeParams = None
     count = len(params)
 
-    declareVars(out, indent, params, cls, generics)
+    declareVars(out, indent, params, cls, generics, typeParams)
 
     returnName = returnType.getName()
     if returnName != 'void':
@@ -308,7 +316,8 @@
         line(out, indent, '}')
         line(out, indent, 'return PyErr_SetArgsError("%s", arg);' %(name))
     elif returnName != 'void':
-        line(out, indent, returnValue(cls, returnType, 'result', genericRT))
+        line(out, indent, returnValue(cls, returnType, 'result',
+                                      genericRT, typeParams))
     else:
         line(out, indent, 'Py_RETURN_NONE;')
     if cardinality and (count or not inCase):

Modified: lucene/pylucene/trunk/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/setup.py?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/setup.py (original)
+++ lucene/pylucene/trunk/jcc/setup.py Sat Nov  7 07:31:25 2009
@@ -12,8 +12,7 @@
 
 import os, sys, platform, subprocess
 
-jcc_ver = '2.4'
-python_ver = '%d.%d.%d' %(sys.version_info[0:3])
+jcc_ver = '2.5'
 machine = platform.machine()
 
 if machine.startswith("iPod") or machine.startswith("iPhone"):
@@ -164,7 +163,7 @@
                     raise NotImplementedError, patch_st_zip()
 
 except ImportError:
-    if python_ver &lt; '2.4':
+    if sys.version_info &lt; (2, 4):
         raise ImportError, 'setuptools is required when using Python 2.3'
     else:
         from distutils.core import setup, Extension

Modified: lucene/pylucene/trunk/test/test_Similarity.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Similarity.py?rev=833641&amp;r1=833640&amp;r2=833641&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Similarity.py (original)
+++ lucene/pylucene/trunk/test/test_Similarity.py Sat Nov  7 07:31:25 2009
@@ -33,9 +33,16 @@
     def idf(self, docFreq, numDocs):
         return 1.0
 
+    def idfTerms(self, terms, searcher):
+        return 1.0
+
     def coord(self, overlap, maxOverlap):
         return 1.0
 
+    def scorePayload(self, docId, fieldName, start, end, payload,
+                     offset, length):
+        return 1.0
+
 
 class SimilarityTestCase(TestCase):
     """




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833496 - /lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091106174939.4BEB923888D8@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091106174939-4BEB923888D8@eris-apache-org%3e</id>
<updated>2009-11-06T17:49:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Fri Nov  6 17:49:38 2009
New Revision: 833496

URL: http://svn.apache.org/viewvc?rev=833496&amp;view=rev
Log:
minor updates

Modified:
    lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml

Modified: lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml
URL: http://svn.apache.org/viewvc/lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml?rev=833496&amp;r1=833495&amp;r2=833496&amp;view=diff
==============================================================================
--- lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml (original)
+++ lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml Fri
Nov  6 17:49:38 2009
@@ -64,8 +64,8 @@
         JCC generates wrappers for all public classes that are requested by
         name on the command line or via the &lt;code&gt;--jar&lt;/code&gt; command line
         argument. It generates wrapper methods for all public methods and
-        fields on these classes whose types are found in one of the
-        following ways:
+        fields on these classes whose return type and parameter types are
+        found in one of the following ways:
       &lt;/p&gt;
       &lt;ul&gt;
         &lt;li&gt;
@@ -81,6 +81,10 @@
         &lt;/li&gt;
       &lt;/ul&gt;
       &lt;p&gt;
+	Overloaded methods are supported and are selected at runtime on the
+	basis of the type and number of arguments passed in.
+      &lt;/p&gt;
+      &lt;p&gt;
         JCC does not generate wrappers for methods or fields which don't
         satisfy these requirements. Thus, JCC can avoid generating code for
         runaway transitive closures of type dependencies.




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833305 - in /lucene/pylucene/branches/pylucene_2_9/jcc: CHANGES INSTALL jcc/python.py jcc/sources/functions.h</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091106055507.AD54E23888E8@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091106055507-AD54E23888E8@eris-apache-org%3e</id>
<updated>2009-11-06T05:55:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Fri Nov  6 05:55:07 2009
New Revision: 833305

URL: http://svn.apache.org/viewvc?rev=833305&amp;view=rev
Log:
 - fixed bug with iterator_next templates using return class != Object

Modified:
    lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES
    lucene/pylucene/branches/pylucene_2_9/jcc/INSTALL
    lucene/pylucene/branches/pylucene_2_9/jcc/jcc/python.py
    lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.h

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES?rev=833305&amp;r1=833304&amp;r2=833305&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES Fri Nov  6 05:55:07 2009
@@ -3,6 +3,7 @@
  - fixed bug in code comparing setuptools versions when &gt;= 0.6c10
  - verified build against setuptools from distribute 0.6.6
  - renamed patch.43 to differentiate setuptools versions
+ - fixed bug with iterator_next templates using return class != Object
  - 
 
 Version 2.3 -&gt; 2.4

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/INSTALL
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/INSTALL?rev=833305&amp;r1=833304&amp;r2=833305&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/INSTALL (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/INSTALL Fri Nov  6 05:55:07 2009
@@ -1,2 +1,3 @@
 
-Please see doc/jcc/documentation/install.html
+Please see doc/jcc/documentation/install.html or
+http://lucene.apache.org/pylucene/jcc/documentation/install.html

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/jcc/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/jcc/python.py?rev=833305&amp;r1=833304&amp;r2=833305&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/jcc/python.py (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/jcc/python.py Fri Nov  6 05:55:07 2009
@@ -718,7 +718,7 @@
         if nextExt:
             tp_iternext = 'get_extension_next'
         else:
-            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_iterator_next&lt;java::util::t_Iterator,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_iterator_next&lt;java::util::t_Iterator,%s%st_%s&gt;)'
%(ns, sep, n)
     elif nextElementMethod and enumeration.isAssignableFrom(cls):
         tp_iter = 'PyObject_SelfIter'
         returnName = typename(nextElementMethod.getReturnType(), cls, False)
@@ -726,7 +726,7 @@
         if nextElementExt:
             tp_iternext = 'get_extension_nextElement'
         else:
-            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s&gt;)'
%(ns, sep, n)
     elif nextMethod:
         tp_iter = 'PyObject_SelfIter'
         returnName = typename(nextMethod.getReturnType(), cls, False)

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.h?rev=833305&amp;r1=833304&amp;r2=833305&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.h (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.h Fri Nov  6 05:55:07
2009
@@ -101,7 +101,7 @@
     return java::util::t_Iterator::wrap_Object(iterator);
 }
 
-template&lt;class T, class U, class V&gt; PyObject *get_iterator_next(T *self)
+template&lt;class T, class U&gt; PyObject *get_iterator_next(T *self)
 {
     jboolean hasNext;
 
@@ -112,17 +112,17 @@
         return NULL;
     }
 
-    V next((jobject) NULL);
+    java::lang::Object next((jobject) NULL);
     OBJ_CALL(next = self-&gt;object.next());
 
     jclass cls = java::lang::String::initializeClass();
     if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
         return env-&gt;fromJString((jstring) next.this$);
 
-    return U::wrap_Object(next);
+    return U::wrap_jobject(next.this$);
 }
 
-template&lt;class T, class U, class V&gt; PyObject *get_enumeration_next(T *self)
+template&lt;class T, class U&gt; PyObject *get_enumeration_next(T *self)
 {
     jboolean hasMoreElements;
 
@@ -133,14 +133,14 @@
         return NULL;
     }
 
-    V next((jobject) NULL);
+    java::lang::Object next((jobject) NULL);
     OBJ_CALL(next = self-&gt;object.nextElement());
 
     jclass cls = java::lang::String::initializeClass();
     if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
         return env-&gt;fromJString((jstring) next.this$);
 
-    return U::wrap_Object(next);
+    return U::wrap_jobject(next.this$);
 }
 
 template&lt;class T, class U, class V&gt; PyObject *get_next(T *self)




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833293 - /lucene/pylucene/dist/KEYS</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200911.mbox/%3c20091106034445.A214023888DC@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091106034445-A214023888DC@eris-apache-org%3e</id>
<updated>2009-11-06T03:44:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Fri Nov  6 03:44:45 2009
New Revision: 833293

URL: http://svn.apache.org/viewvc?rev=833293&amp;view=rev
Log:
new, stronger, non SHA-1 key

Modified:
    lucene/pylucene/dist/KEYS

Modified: lucene/pylucene/dist/KEYS
URL: http://svn.apache.org/viewvc/lucene/pylucene/dist/KEYS?rev=833293&amp;r1=833292&amp;r2=833293&amp;view=diff
==============================================================================
--- lucene/pylucene/dist/KEYS (original)
+++ lucene/pylucene/dist/KEYS Fri Nov  6 03:44:45 2009
@@ -10,39 +10,61 @@
         (gpg --list-sigs &lt;your name&gt;
              &amp;&amp; gpg --armor --export &lt;your name&gt;) &gt;&gt; this file.
 
-pub   1024D/7DADCFA5 2009-03-11
-uid                  Andi Vajda (code signing key) &lt;vajda@apache.org&gt;
-sig 3        7DADCFA5 2009-03-11  Andi Vajda (code signing key) &lt;vajda@apache.org&gt;
-sub   2048g/D4603DA8 2009-03-11
-sig          7DADCFA5 2009-03-11  Andi Vajda (code signing key) &lt;vajda@apache.org&gt;
+pub   4096R/0ED7633F 2009-11-06
+uid                  Andi Vajda (CODE SIGNING KEY) &lt;vajda@apache.org&gt;
+sig 3        0ED7633F 2009-11-06  Andi Vajda (CODE SIGNING KEY) &lt;vajda@apache.org&gt;
+sub   4096R/2B648A1D 2009-11-06
+sig          0ED7633F 2009-11-06  Andi Vajda (CODE SIGNING KEY) &lt;vajda@apache.org&gt;
 
 -----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v2.0.11 (Darwin)
+Version: GnuPG v2.0.12 (Darwin)
 
-mQGiBEm3QZMRBADmOHcoZzxpQGrvkLP/ZKkX1OfAurViu0XFgOhFib1zfKaUU84h
-1wv88fDdgvNOBbZnzLxkr4NFi2ss73SWF31IlIbvrr3EhdbynnQ4BgE3AnMvELf6
-23hv8ci6NmST4paXlUNLsrt7WUWxvHGp6opWoKLIB89sk+1sZAIWeqWQOwCgqDFS
-2k6sBBkPkddb2vhGKhBRy7cEALsNr9MYrz7HqXGbwxub9FA9zLSHWlzv//nhoJYg
-x+ZayxSbckaYwXcXRuDfBFGvC+bT7bumdBPRtifO6TYc70XxNNxXaJXW6/C6q5DM
-lfAKzdmIguArXNw30jh9lu9yQhaZmB5Jg/ep5mA2gtygs83y1wBiBUpmfWfZu0aO
-0VY4BACIw6j6MjOroHJkCOKARzFMSlcEmSQ1FVaS6KpH1HFybQrVWrw1x2pyvULe
-HO+wKHqVLZf1Swrj37nWfCxaCme1K1coMMLx+vEBuFuDd93XMLFdfqYXz3qOlgp1
-I9NvCR89ISJsOuYOYkyu7qr+WlGVXE8gStgedx/O2KywvAPcubQwQW5kaSBWYWpk
-YSAoY29kZSBzaWduaW5nIGtleSkgPHZhamRhQGFwYWNoZS5vcmc+iGAEExECACAF
-Akm3QZMCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA5gV2yfa3PpbRwAKCk
-it95uXiBM68/DEj7tMVbfEHvRwCfb37Fx7BbvL0KCAkF+Yl8ey1g7Ky5Ag0ESbdB
-kxAIAKlThvXg3uuiRfhn9xCAX7DJdlupQX+JlTvfIN3hVL14jGOCY8xIT5cdm0X1
-UEh04hk/YjmtBxdpuOF2EooNxtW67kMHlfh8jSwM/i15f+dIrx2uXK35svLR5zbR
-E0URkohU5q8pXT0W8GSDwD2ilXZCNspnrfITY/b0zCnSsnLVgKP7ZMSNM2c35Uin
-n6teswWqRDIlAN741DijqVOcHDOgQK9KfJcsw3ITe2ku3HSHARt2rT3AEDzVbPo9
-gR3ez2CpzrJWEPI3riqXWOIuby143Y5qEPmaOUc2+t7DG51FxjWHnLm7TiAWPvfs
-ZDBwDRZIOWk1f+OoFbvU8uWMYy8AAwUIAKQl8SYJ52qBl2c30x3GqmDMHIXtZEt3
-dXGhf9y9asXIzU+gClYvCw7X9pgw8RYjTa0QRzaxCIlFGZAU+bgvAPz5vcQgqiiI
-5yNjHZlzl7V8tgRhxsrNaVdLcNIGOqAd9V1Y3j2sbn/TS6DqnQLZefO2ozG6vQ4x
-m0K/E5dHUvFQYbdP7F7gycdlTgnAymr4221og3jbLD4MVwH6pWAcYdwjuAhdICDo
-OZWfk0OuVpc/dt369ubmpDYs2jJIkDi4lP2NCCFEurap/JUnv5wQhLdcvjR0jdn+
-yhTyiXH0qYfkQ/qzbFY32BGx1TIRBiF/nL2Vqi5PlkOMBMor13dyzNqISQQYEQIA
-CQUCSbdBkwIbDAAKCRA5gV2yfa3PpeZzAJ9MroQpugQRKhyizDecl1EaHLWkIwCc
-Cpb7n7F90rjEyStj6qixHAHiQhw=
-=el8n
+mQINBErzmBwBEADPj4FTKC0ZTyoeORLoqhfPtLcrrrii2fp5YPHkw9+3ezBf4cl9
+asaFwHxOFapT/odb6Khfho+5JrRYWJZw7P6ojEGd00i72HWyFBMiJagtLyUFVb+k
+VHa1eNdkC2qS48ONpdCZVGwOmKgCQeYUZkWCNfLNl/+uEvAd1Su3Q2CyxtKpQCrM
+yOaQARjVVwenRr+bihpjhapnedd4r0VPwSXnkCxpS8o4d0OIbMdxI3/OZUBoM8wf
+vcfwZki02aFE6XGletdjvVOGzonxIeEUaw6kPWKv5aqE0nCW7I6PjbQgw3ToFm7r
+du+j5abOBB7M2Y8jLoeFCMwKu6le1JI0vMuEjpecSI5AJrdcoQP7I4h48cUCaKTw
+iXthVXbBiwccaSqEJXLE7qDd+QQEJmNXtfY6m0t2bTCZf3gK3L0gfoXLreHDcc8X
+UyDXsJA6aUbmYVCrjL9ZMcXtR0UZPfROHLZG9HXinU3vFlkWGIE5g6Qs8N/9ueQL
+/EwerZUjxBuy5aIX0CqlCkHXY4DMAHuHHLIb+3UA5/fi0Ql+Kx1v2E1U6QleW6b+
+W5fINdWH2Kgl8I75HD/iLetPfZgchvLv/xRbhUc13Jlh5hHsVy1E2ErCOVSnV9Ko
+wQ1gmItO+BoRIRnGWto02ArC9TvCk7qUlzOO8YSn6vQ2QIZN5VDKZkdJSQARAQAB
+tDBBbmRpIFZhamRhIChDT0RFIFNJR05JTkcgS0VZKSA8dmFqZGFAYXBhY2hlLm9y
+Zz6JAjcEEwEKACEFAkrzmBwCGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQ
+iOJ8og7XYz9/gQ//bpH5i0xLVqrTB97OeO43C/jtvuftqvb2UQZZmtcN/xfavFhE
+Va/bIzo8UZEc08hY7c0srInw5A7P/tX0KEvXZ7sfDzVefj7RGRd8qEHbs87sxAhS
++0lo5/a5LGqyuw/Gi/N5rWAmh4BVwd04PQ5GfuqB6ceALAbIrAUx5/a6UvUW6Gdd
+IozkzhTeIk5MDQUtQkZRzBO6r+rTQp2EKITSYLDzxBZkcA6anJCK/R3G2ew74gW2
+BgOEOLk2b8HLxbC9WJnbYIUSAsPfr2tO0vK7IuoluzoI7Y83WvUmBxpE/ULjGetL
+coSxRY2uOhwmmfh6nT1icY0k1ULkKd0nKKxteFLewpLvNt1iR6wLL9IbQkiK/JLY
+aZNjq+IWwZNVhHrCrTqRODVnGnurkTI9qgux2ZudBDOZHD5mS0cW58bY3oHHdgXK
+6EHtxAGlZ5LYJmp3+1tuLmk8bgu+Cf8aY6+RHy12gbNm7z/7Ms9bLM4VDTYLx9Wr
+G2PMaDOt01pGeS2hU7ESMgmN74r/zJIXEuMcneS2jfXjgzwZbciEtDcz9sXQCfsc
+8wv1XQO9906AFmtCE1Gkbjh+T8UEjiVFzBN7nsSu5V8eA1lM0K3GIUzXosw6xNb4
+zkdcqQ9wzaGiIUhx48n3AxokXnRA82L33y+LxDOwvs99fLMawv/bgMd7AtC5Ag0E
+SvOYHAEQANvv02Q313PcZl+falGl09CiWPMN8sl50olzgHoUydx5gVh4JksjxLrl
+pKGE1SimgBcfk6GmWWUii3uI1zdeo8c7FzSwepNCD3yW0ljDV3iysm7Ewl+RxF5E
+E/tW3YYhIF+xgp65BE7iziLcTUyZAQNEs2/Y3m4m7A34ZnBcWh6ATaC2ZLDfuNkG
+PEtl6xfs7gTNT+Mw4j18PMWlb8K+l3F8oW2A1kisYrYdeN4idKa/PiQi3wVLSZpq
+hB44CW9l1o+4d8ukIYbqCNbBxnv6nXN0hgEJzthAhlc3UZQEgy1ObIOd24atK5C3
+YQDjUIjjvyvUd+k2QkdWfuCz5dsXgnjTY/TZBQQJUu+Tep1LPSQmyxef+qahzOOw
+dnTET8u45Fg6ssIopxQrrAO8CKSgZQoS5Bt20ZT41vPeXTDRwtwsozPOfWe0sgIJ
+zRvXx/p5rWaOOuxOy3Oj9KmnmUMSjLDQOff0obtp/yIPG+EsCx2VauymWQAIb7G9
+eBUyPlJn8mjAep5RafMLwmqivsLJTWM2TyxIkIHYzuHVZA6rq/3OYmacdwAwM67U
+hr08Rrivn5GD3y7sA7057NIIlq3qKc2yBnh3jNY4V77xKwHs0cixPRR+1gKvzvlW
+3MlSNrywCrhg500hVaLyjVYcrA4IFYM4m8kVcC1rJAYbTk0MEZhzABEBAAGJAh8E
+GAEKAAkFAkrzmBwCGwwACgkQiOJ8og7XYz8hrhAAjJHgakZxARbb18cksIBP2ZGe
+U271DrfmrUOFZzJ2dWN3EAEcqWx9kyQrQONhZXqLlm+ABrtTNvb+2YaaYhRz/KPR
+vlS2zoex9+0O7XOU/VVf56FTjY4u388KtgA59hizisOLttZOodSbgrGWY7YH7in2
+f2S6s4V7EEW7PzUQW0u8YPLIq3gVETRPGNoIZSRWtubnfdlI9mypUQdGGJNOoU7m
+XaBJGhdV3kOPkwqhAkNVqlSx07lQXtyUvxkiwonTFiPK8wtXvDd1tIklvKVuLaKc
+Z+8YJDVMyvyciDLaWfUsfdW5qFnyCczaFprQdHYzTfwcTnSUZsjO3NDeB+zgh/WT
+1W4pijMIZ5nPv/ck5lTApdwkY7Hva4KFouT6UoIoeqf7y2FilFgFw3Qx99tc063b
+2H3C4I5ltPPVgMJBENKewxs//ACG6tzBk8mg3BsyNLcHTEFXxTZWehz44/ANId62
+ZcR2gZbZqWTrhbqrD3mEaF0+h44nnN3EV9bBpC1LtqQiyVt5V5wog2Lcy0iLE3+5
+ZlmJM3L3t+YPhn9umWPUyeFcT+PwPWmXwuleYgIqvyAx45OpZxIfJqeagvP2HqDw
+uQEwQGfmzWUu8eodBE3EUk7vc4Pkiwg1Utc6IU+lxkKTnudlv5L+yQTK1ZrPvtUJ
++BIHfm3D+XgW1H2VADY=
+=8HqM
 -----END PGP PUBLIC KEY BLOCK-----




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830781 - /lucene/pylucene/trunk/jcc/setup.py</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091028222429.E863A238890A@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091028222429-E863A238890A@eris-apache-org%3e</id>
<updated>2009-10-28T22:24:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Wed Oct 28 22:24:29 2009
New Revision: 830781

URL: http://svn.apache.org/viewvc?rev=830781&amp;view=rev
Log:
fixed bug in format parameters

Modified:
    lucene/pylucene/trunk/jcc/setup.py

Modified: lucene/pylucene/trunk/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/setup.py?rev=830781&amp;r1=830780&amp;r2=830781&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/setup.py (original)
+++ lucene/pylucene/trunk/jcc/setup.py Wed Oct 28 22:24:29 2009
@@ -139,7 +139,7 @@
     sudo patch -d %s -Nup0 &lt; %s/jcc/patches/patch.43.%s
 
 See %s/INSTALL for more information about shared mode.
-''' %(patch_version, st_egg, jccdir, jccdir, patch_version)
+''' %(patch_version, st_egg, jccdir, patch_version, jccdir)
 
                 def patch_st_zip():
                     return '''




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830780 - /lucene/pylucene/branches/pylucene_2_9/jcc/setup.py</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091028222416.CC86023888D7@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091028222416-CC86023888D7@eris-apache-org%3e</id>
<updated>2009-10-28T22:24:16Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Wed Oct 28 22:24:16 2009
New Revision: 830780

URL: http://svn.apache.org/viewvc?rev=830780&amp;view=rev
Log:
fixed bug in format parameters

Modified:
    lucene/pylucene/branches/pylucene_2_9/jcc/setup.py

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/setup.py?rev=830780&amp;r1=830779&amp;r2=830780&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/setup.py (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/setup.py Wed Oct 28 22:24:16 2009
@@ -139,7 +139,7 @@
     sudo patch -d %s -Nup0 &lt; %s/jcc/patches/patch.43.%s
 
 See %s/INSTALL for more information about shared mode.
-''' %(patch_version, st_egg, jccdir, jccdir, patch_version)
+''' %(patch_version, st_egg, jccdir, patch_version, jccdir)
 
                 def patch_st_zip():
                     return '''




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830341 - in /lucene/pylucene/trunk/jcc: CHANGES jcc/patches/patch.43 jcc/patches/patch.43.0.6c11 jcc/patches/patch.43.0.6c7 setup.py</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091027211410.A0DF62388909@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027211410-A0DF62388909@eris-apache-org%3e</id>
<updated>2009-10-27T21:14:10Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Tue Oct 27 21:14:10 2009
New Revision: 830341

URL: http://svn.apache.org/viewvc?rev=830341&amp;view=rev
Log:
 - fixed bug in code comparing setuptools versions when &gt;= 0.6c10
 - verified build against setuptools from distribute 0.6.6
 - renamed patch.43 to differentiate setuptools versions

Added:
    lucene/pylucene/trunk/jcc/jcc/patches/patch.43.0.6c11
    lucene/pylucene/trunk/jcc/jcc/patches/patch.43.0.6c7
      - copied unchanged from r820102, lucene/pylucene/trunk/jcc/jcc/patches/patch.43
Removed:
    lucene/pylucene/trunk/jcc/jcc/patches/patch.43
Modified:
    lucene/pylucene/trunk/jcc/CHANGES
    lucene/pylucene/trunk/jcc/setup.py   (contents, props changed)

Modified: lucene/pylucene/trunk/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/CHANGES?rev=830341&amp;r1=830340&amp;r2=830341&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/CHANGES (original)
+++ lucene/pylucene/trunk/jcc/CHANGES Tue Oct 27 21:14:10 2009
@@ -8,6 +8,9 @@
  - added 'string_' property to JArray('byte') instances to extract byte string
  - fixed bug with passing list of extension objects
  - reworked iterator and enumeration 'next' templates to shortcut C++ wrappers
+ - fixed bug in code comparing setuptools versions when &gt;= 0.6c10
+ - verified build against setuptools from distribute 0.6.6
+ - renamed patch.43 to differentiate setuptools versions
  - 
 
 Version 2.3 -&gt; 2.4

Added: lucene/pylucene/trunk/jcc/jcc/patches/patch.43.0.6c11
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/patches/patch.43.0.6c11?rev=830341&amp;view=auto
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/patches/patch.43.0.6c11 (added)
+++ lucene/pylucene/trunk/jcc/jcc/patches/patch.43.0.6c11 Tue Oct 27 21:14:10 2009
@@ -0,0 +1,135 @@
+Index: setuptools/extension.py
+===================================================================
+--- setuptools/extension.py	(revision 75864)
++++ setuptools/extension.py	(working copy)
+@@ -28,6 +28,11 @@
+ class Library(Extension):
+     """Just like a regular Extension, but built as a library instead"""
+ 
++    def __init__(self, *args, **kwds):
++        self.force_shared = kwds.pop('force_shared', False)
++        Extension.__init__(self, *args, **kwds)
++
++
+ import sys, distutils.core, distutils.extension
+ distutils.core.Extension = Extension
+ distutils.extension.Extension = Extension
+Index: setuptools/command/build_ext.py
+===================================================================
+--- setuptools/command/build_ext.py	(revision 75864)
++++ setuptools/command/build_ext.py	(working copy)
+@@ -85,8 +85,12 @@
+         if fullname in self.ext_map:
+             ext = self.ext_map[fullname]
+             if isinstance(ext,Library):
++                if ext.force_shared and not use_stubs:
++                    _libtype = 'shared'
++                else:
++                    _libtype = libtype
+                 fn, ext = os.path.splitext(filename)
+-                return self.shlib_compiler.library_filename(fn,libtype)
++                return self.shlib_compiler.library_filename(fn,_libtype)
+             elif use_stubs and ext._links_to_dynamic:
+                 d,fn = os.path.split(filename)
+                 return os.path.join(d,'dl-'+fn)
+@@ -170,14 +174,22 @@
+     def build_extension(self, ext):
+         _compiler = self.compiler
+         try:
++            force_shared = False
+             if isinstance(ext,Library):
+                 self.compiler = self.shlib_compiler
++                force_shared = ext.force_shared and not use_stubs
++                if force_shared:
++                    self.compiler.link_shared_object = \
++                        sh_link_shared_object.__get__(self.compiler)
+             _build_ext.build_extension(self,ext)
+             if ext._needs_stub:
+                 self.write_stub(
+                     self.get_finalized_command('build_py').build_lib, ext
+                 )
+         finally:
++            if force_shared:
++                self.compiler.link_shared_object = \
++                    link_shared_object.__get__(self.compiler)
+             self.compiler = _compiler
+ 
+     def links_to_dynamic(self, ext):
+@@ -244,44 +256,41 @@
+                 os.unlink(stub_file)
+ 
+ 
+-if use_stubs or os.name=='nt':
+-    # Build shared libraries
+-    #
+-    def link_shared_object(self, objects, output_libname, output_dir=None,
+-        libraries=None, library_dirs=None, runtime_library_dirs=None,
+-        export_symbols=None, debug=0, extra_preargs=None,
+-        extra_postargs=None, build_temp=None, target_lang=None
+-    ):  self.link(
+-            self.SHARED_LIBRARY, objects, output_libname,
+-            output_dir, libraries, library_dirs, runtime_library_dirs,
+-            export_symbols, debug, extra_preargs, extra_postargs,
+-            build_temp, target_lang
+-        )
+-else:
+-    # Build static libraries everywhere else
+-    libtype = 'static'
++def sh_link_shared_object(self, objects, output_libname, output_dir=None,
++    libraries=None, library_dirs=None, runtime_library_dirs=None,
++    export_symbols=None, debug=0, extra_preargs=None,
++    extra_postargs=None, build_temp=None, target_lang=None
++):  self.link(self.SHARED_LIBRARY, objects, output_libname,
++              output_dir, libraries, library_dirs, runtime_library_dirs,
++              export_symbols, debug, extra_preargs, extra_postargs,
++              build_temp, target_lang)
+ 
+-    def link_shared_object(self, objects, output_libname, output_dir=None,
+-        libraries=None, library_dirs=None, runtime_library_dirs=None,
+-        export_symbols=None, debug=0, extra_preargs=None,
+-        extra_postargs=None, build_temp=None, target_lang=None
+-    ):
+-        # XXX we need to either disallow these attrs on Library instances,
+-        #     or warn/abort here if set, or something...
+-        #libraries=None, library_dirs=None, runtime_library_dirs=None,
+-        #export_symbols=None, extra_preargs=None, extra_postargs=None,
+-        #build_temp=None
++def st_link_shared_object(self, objects, output_libname, output_dir=None,
++    libraries=None, library_dirs=None, runtime_library_dirs=None,
++    export_symbols=None, debug=0, extra_preargs=None,
++    extra_postargs=None, build_temp=None, target_lang=None
++):
++    # XXX we need to either disallow these attrs on Library instances,
++    #     or warn/abort here if set, or something...
++    #libraries=None, library_dirs=None, runtime_library_dirs=None,
++    #export_symbols=None, extra_preargs=None, extra_postargs=None,
++    #build_temp=None
+ 
+-        assert output_dir is None   # distutils build_ext doesn't pass this
+-        output_dir,filename = os.path.split(output_libname)
+-        basename, ext = os.path.splitext(filename)
+-        if self.library_filename("x").startswith('lib'):
+-            # strip 'lib' prefix; this is kludgy if some platform uses
+-            # a different prefix
+-            basename = basename[3:]
++    assert output_dir is None   # distutils build_ext doesn't pass this
++    output_dir,filename = os.path.split(output_libname)
++    basename, ext = os.path.splitext(filename)
++    if self.library_filename("x").startswith('lib'):
++        # strip 'lib' prefix; this is kludgy if some platform uses
++        # a different prefix
++        basename = basename[3:]
+ 
+-        self.create_static_lib(
+-            objects, basename, output_dir, debug, target_lang
+-        )
++    self.create_static_lib(objects, basename, output_dir, debug, target_lang)
+ 
+ 
++if use_stubs or os.name=='nt':
++    # Build shared libraries
++    link_shared_object = sh_link_shared_object
++else:
++    # Build static libraries everywhere else (unless force_shared)
++    libtype = 'static'
++    link_shared_object = st_link_shared_object

Modified: lucene/pylucene/trunk/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/setup.py?rev=830341&amp;r1=830340&amp;r2=830341&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/setup.py (original)
+++ lucene/pylucene/trunk/jcc/setup.py Tue Oct 27 21:14:10 2009
@@ -109,10 +109,12 @@
         raise ImportError
     from setuptools import setup, Extension
     from pkg_resources import require
-    with_setuptools = require('setuptools')[0].version
-
+    with_setuptools = require('setuptools')[0].parsed_version
+    
     enable_shared = False
-    if with_setuptools &gt;= '0.6c7' and 'NO_SHARED' not in os.environ:
+    with_setuptools_c7 = ('00000000', '00000006', '*c', '00000007', '*final')
+    with_setuptools_c11 = ('00000000', '00000006', '*c', '00000011', '*final')
+    if with_setuptools &gt;= with_setuptools_c7 and 'NO_SHARED' not in os.environ:
         if platform in ('darwin', 'ipod', 'win32'):
             enable_shared = True
         elif platform == 'linux2':
@@ -123,34 +125,38 @@
                 import setuptools
                 jccdir = os.path.dirname(os.path.abspath(__file__))
                 st_egg = os.path.dirname(setuptools.__path__[0])
+                if with_setuptools &lt; with_setuptools_c11:
+                    patch_version = '0.6c7'
+                else:
+                    patch_version = '0.6c11'
 
                 def patch_st_dir():
                     return '''
 
-Shared mode is disabled, setuptools patch.43 must be applied to enable it
+Shared mode is disabled, setuptools patch.43.%s must be applied to enable it
 or the NO_SHARED environment variable must be set to turn off this error.
 
-    sudo patch -d %s -Nup0 &lt; %s/jcc/patches/patch.43
+    sudo patch -d %s -Nup0 &lt; %s/jcc/patches/patch.43.%s
 
 See %s/INSTALL for more information about shared mode.
-''' %(st_egg, jccdir, jccdir)
+''' %(patch_version, st_egg, jccdir, jccdir, patch_version)
 
                 def patch_st_zip():
                     return '''
 
-Shared mode is disabled, setuptools patch.43 must be applied to enable it
+Shared mode is disabled, setuptools patch.43.%s must be applied to enable it
 or the NO_SHARED environment variable must be set to turn off this error.
 
     mkdir tmp
     cd tmp
     unzip -q %s
-    patch -Nup0 &lt; %s/jcc/patches/patch.43
+    patch -Nup0 &lt; %s/jcc/patches/patch.43.%s
     sudo zip %s -f
     cd ..
     rm -rf tmp
 
 See %s/INSTALL for more information about shared mode.
-''' %(st_egg, jccdir, st_egg, jccdir)
+''' %(patch_version, st_egg, jccdir, patch_version, st_egg, jccdir)
 
                 if os.path.isdir(st_egg):
                     raise NotImplementedError, patch_st_dir()

Propchange: lucene/pylucene/trunk/jcc/setup.py
------------------------------------------------------------------------------
    svn:mergeinfo = /lucene/pylucene/branches/pylucene_2_9/jcc/setup.py:830336




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830336 - in /lucene/pylucene/branches/pylucene_2_9/jcc: CHANGES jcc/patches/patch.43 jcc/patches/patch.43.0.6c11 jcc/patches/patch.43.0.6c7 setup.py</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091027210031.CAA6C238890A@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027210031-CAA6C238890A@eris-apache-org%3e</id>
<updated>2009-10-27T21:00:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Tue Oct 27 21:00:31 2009
New Revision: 830336

URL: http://svn.apache.org/viewvc?rev=830336&amp;view=rev
Log:
renamed patch.43 to differentiate setuptools versions

Added:
    lucene/pylucene/branches/pylucene_2_9/jcc/jcc/patches/patch.43.0.6c11
    lucene/pylucene/branches/pylucene_2_9/jcc/jcc/patches/patch.43.0.6c7
      - copied unchanged from r829919, lucene/pylucene/branches/pylucene_2_9/jcc/jcc/patches/patch.43
Removed:
    lucene/pylucene/branches/pylucene_2_9/jcc/jcc/patches/patch.43
Modified:
    lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES
    lucene/pylucene/branches/pylucene_2_9/jcc/setup.py

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES?rev=830336&amp;r1=830335&amp;r2=830336&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES Tue Oct 27 21:00:31 2009
@@ -2,6 +2,7 @@
 --------------------
  - fixed bug in code comparing setuptools versions when &gt;= 0.6c10
  - verified build against setuptools from distribute 0.6.6
+ - renamed patch.43 to differentiate setuptools versions
  - 
 
 Version 2.3 -&gt; 2.4

Added: lucene/pylucene/branches/pylucene_2_9/jcc/jcc/patches/patch.43.0.6c11
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/jcc/patches/patch.43.0.6c11?rev=830336&amp;view=auto
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/jcc/patches/patch.43.0.6c11 (added)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/jcc/patches/patch.43.0.6c11 Tue Oct 27 21:00:31
2009
@@ -0,0 +1,135 @@
+Index: setuptools/extension.py
+===================================================================
+--- setuptools/extension.py	(revision 75864)
++++ setuptools/extension.py	(working copy)
+@@ -28,6 +28,11 @@
+ class Library(Extension):
+     """Just like a regular Extension, but built as a library instead"""
+ 
++    def __init__(self, *args, **kwds):
++        self.force_shared = kwds.pop('force_shared', False)
++        Extension.__init__(self, *args, **kwds)
++
++
+ import sys, distutils.core, distutils.extension
+ distutils.core.Extension = Extension
+ distutils.extension.Extension = Extension
+Index: setuptools/command/build_ext.py
+===================================================================
+--- setuptools/command/build_ext.py	(revision 75864)
++++ setuptools/command/build_ext.py	(working copy)
+@@ -85,8 +85,12 @@
+         if fullname in self.ext_map:
+             ext = self.ext_map[fullname]
+             if isinstance(ext,Library):
++                if ext.force_shared and not use_stubs:
++                    _libtype = 'shared'
++                else:
++                    _libtype = libtype
+                 fn, ext = os.path.splitext(filename)
+-                return self.shlib_compiler.library_filename(fn,libtype)
++                return self.shlib_compiler.library_filename(fn,_libtype)
+             elif use_stubs and ext._links_to_dynamic:
+                 d,fn = os.path.split(filename)
+                 return os.path.join(d,'dl-'+fn)
+@@ -170,14 +174,22 @@
+     def build_extension(self, ext):
+         _compiler = self.compiler
+         try:
++            force_shared = False
+             if isinstance(ext,Library):
+                 self.compiler = self.shlib_compiler
++                force_shared = ext.force_shared and not use_stubs
++                if force_shared:
++                    self.compiler.link_shared_object = \
++                        sh_link_shared_object.__get__(self.compiler)
+             _build_ext.build_extension(self,ext)
+             if ext._needs_stub:
+                 self.write_stub(
+                     self.get_finalized_command('build_py').build_lib, ext
+                 )
+         finally:
++            if force_shared:
++                self.compiler.link_shared_object = \
++                    link_shared_object.__get__(self.compiler)
+             self.compiler = _compiler
+ 
+     def links_to_dynamic(self, ext):
+@@ -244,44 +256,41 @@
+                 os.unlink(stub_file)
+ 
+ 
+-if use_stubs or os.name=='nt':
+-    # Build shared libraries
+-    #
+-    def link_shared_object(self, objects, output_libname, output_dir=None,
+-        libraries=None, library_dirs=None, runtime_library_dirs=None,
+-        export_symbols=None, debug=0, extra_preargs=None,
+-        extra_postargs=None, build_temp=None, target_lang=None
+-    ):  self.link(
+-            self.SHARED_LIBRARY, objects, output_libname,
+-            output_dir, libraries, library_dirs, runtime_library_dirs,
+-            export_symbols, debug, extra_preargs, extra_postargs,
+-            build_temp, target_lang
+-        )
+-else:
+-    # Build static libraries everywhere else
+-    libtype = 'static'
++def sh_link_shared_object(self, objects, output_libname, output_dir=None,
++    libraries=None, library_dirs=None, runtime_library_dirs=None,
++    export_symbols=None, debug=0, extra_preargs=None,
++    extra_postargs=None, build_temp=None, target_lang=None
++):  self.link(self.SHARED_LIBRARY, objects, output_libname,
++              output_dir, libraries, library_dirs, runtime_library_dirs,
++              export_symbols, debug, extra_preargs, extra_postargs,
++              build_temp, target_lang)
+ 
+-    def link_shared_object(self, objects, output_libname, output_dir=None,
+-        libraries=None, library_dirs=None, runtime_library_dirs=None,
+-        export_symbols=None, debug=0, extra_preargs=None,
+-        extra_postargs=None, build_temp=None, target_lang=None
+-    ):
+-        # XXX we need to either disallow these attrs on Library instances,
+-        #     or warn/abort here if set, or something...
+-        #libraries=None, library_dirs=None, runtime_library_dirs=None,
+-        #export_symbols=None, extra_preargs=None, extra_postargs=None,
+-        #build_temp=None
++def st_link_shared_object(self, objects, output_libname, output_dir=None,
++    libraries=None, library_dirs=None, runtime_library_dirs=None,
++    export_symbols=None, debug=0, extra_preargs=None,
++    extra_postargs=None, build_temp=None, target_lang=None
++):
++    # XXX we need to either disallow these attrs on Library instances,
++    #     or warn/abort here if set, or something...
++    #libraries=None, library_dirs=None, runtime_library_dirs=None,
++    #export_symbols=None, extra_preargs=None, extra_postargs=None,
++    #build_temp=None
+ 
+-        assert output_dir is None   # distutils build_ext doesn't pass this
+-        output_dir,filename = os.path.split(output_libname)
+-        basename, ext = os.path.splitext(filename)
+-        if self.library_filename("x").startswith('lib'):
+-            # strip 'lib' prefix; this is kludgy if some platform uses
+-            # a different prefix
+-            basename = basename[3:]
++    assert output_dir is None   # distutils build_ext doesn't pass this
++    output_dir,filename = os.path.split(output_libname)
++    basename, ext = os.path.splitext(filename)
++    if self.library_filename("x").startswith('lib'):
++        # strip 'lib' prefix; this is kludgy if some platform uses
++        # a different prefix
++        basename = basename[3:]
+ 
+-        self.create_static_lib(
+-            objects, basename, output_dir, debug, target_lang
+-        )
++    self.create_static_lib(objects, basename, output_dir, debug, target_lang)
+ 
+ 
++if use_stubs or os.name=='nt':
++    # Build shared libraries
++    link_shared_object = sh_link_shared_object
++else:
++    # Build static libraries everywhere else (unless force_shared)
++    libtype = 'static'
++    link_shared_object = st_link_shared_object

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/setup.py?rev=830336&amp;r1=830335&amp;r2=830336&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/setup.py (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/setup.py Tue Oct 27 21:00:31 2009
@@ -112,8 +112,9 @@
     with_setuptools = require('setuptools')[0].parsed_version
     
     enable_shared = False
-    with_setuptools_min = ('00000000', '00000006', '*c', '00000007', '*final')
-    if with_setuptools &gt;= with_setuptools_min and 'NO_SHARED' not in os.environ:
+    with_setuptools_c7 = ('00000000', '00000006', '*c', '00000007', '*final')
+    with_setuptools_c11 = ('00000000', '00000006', '*c', '00000011', '*final')
+    if with_setuptools &gt;= with_setuptools_c7 and 'NO_SHARED' not in os.environ:
         if platform in ('darwin', 'ipod', 'win32'):
             enable_shared = True
         elif platform == 'linux2':
@@ -124,34 +125,38 @@
                 import setuptools
                 jccdir = os.path.dirname(os.path.abspath(__file__))
                 st_egg = os.path.dirname(setuptools.__path__[0])
+                if with_setuptools &lt; with_setuptools_c11:
+                    patch_version = '0.6c7'
+                else:
+                    patch_version = '0.6c11'
 
                 def patch_st_dir():
                     return '''
 
-Shared mode is disabled, setuptools patch.43 must be applied to enable it
+Shared mode is disabled, setuptools patch.43.%s must be applied to enable it
 or the NO_SHARED environment variable must be set to turn off this error.
 
-    sudo patch -d %s -Nup0 &lt; %s/jcc/patches/patch.43
+    sudo patch -d %s -Nup0 &lt; %s/jcc/patches/patch.43.%s
 
 See %s/INSTALL for more information about shared mode.
-''' %(st_egg, jccdir, jccdir)
+''' %(patch_version, st_egg, jccdir, jccdir, patch_version)
 
                 def patch_st_zip():
                     return '''
 
-Shared mode is disabled, setuptools patch.43 must be applied to enable it
+Shared mode is disabled, setuptools patch.43.%s must be applied to enable it
 or the NO_SHARED environment variable must be set to turn off this error.
 
     mkdir tmp
     cd tmp
     unzip -q %s
-    patch -Nup0 &lt; %s/jcc/patches/patch.43
+    patch -Nup0 &lt; %s/jcc/patches/patch.43.%s
     sudo zip %s -f
     cd ..
     rm -rf tmp
 
 See %s/INSTALL for more information about shared mode.
-''' %(st_egg, jccdir, st_egg, jccdir)
+''' %(patch_version, st_egg, jccdir, patch_version, st_egg, jccdir)
 
                 if os.path.isdir(st_egg):
                     raise NotImplementedError, patch_st_dir()




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830321 - in /lucene/pylucene/branches/pylucene_2_9/jcc: CHANGES setup.py</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091027200357.16B5A238889D@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027200357-16B5A238889D@eris-apache-org%3e</id>
<updated>2009-10-27T20:03:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Tue Oct 27 20:03:56 2009
New Revision: 830321

URL: http://svn.apache.org/viewvc?rev=830321&amp;view=rev
Log:
 - fixed bug in code comparing setuptools versions when &gt;= 0.6c10
 - verified build against setuptools from distribute 0.6.6

Modified:
    lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES
    lucene/pylucene/branches/pylucene_2_9/jcc/setup.py

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES?rev=830321&amp;r1=830320&amp;r2=830321&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES Tue Oct 27 20:03:56 2009
@@ -1,3 +1,8 @@
+Version 2.4 -&gt; 2.4.1
+--------------------
+ - fixed bug in code comparing setuptools versions when &gt;= 0.6c10
+ - verified build against setuptools from distribute 0.6.6
+ - 
 
 Version 2.3 -&gt; 2.4
 ------------------

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/setup.py?rev=830321&amp;r1=830320&amp;r2=830321&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/setup.py (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/setup.py Tue Oct 27 20:03:56 2009
@@ -12,7 +12,7 @@
 
 import os, sys, platform, subprocess
 
-jcc_ver = '2.4'
+jcc_ver = '2.4.1'
 python_ver = '%d.%d.%d' %(sys.version_info[0:3])
 machine = platform.machine()
 
@@ -109,10 +109,11 @@
         raise ImportError
     from setuptools import setup, Extension
     from pkg_resources import require
-    with_setuptools = require('setuptools')[0].version
-
+    with_setuptools = require('setuptools')[0].parsed_version
+    
     enable_shared = False
-    if with_setuptools &gt;= '0.6c7' and 'NO_SHARED' not in os.environ:
+    with_setuptools_min = ('00000000', '00000006', '*c', '00000007', '*final')
+    if with_setuptools &gt;= with_setuptools_min and 'NO_SHARED' not in os.environ:
         if platform in ('darwin', 'ipod', 'win32'):
             enable_shared = True
         elif platform == 'linux2':




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830066 - in /lucene/pylucene/trunk: java/org/apache/pylucene/queryParser/ java/org/apache/pylucene/search/ jcc/jcc/ samples/ test/</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091027055750.D3A8F23888DB@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027055750-D3A8F23888DB@eris-apache-org%3e</id>
<updated>2009-10-27T05:57:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Tue Oct 27 05:57:19 2009
New Revision: 830066

URL: http://svn.apache.org/viewvc?rev=830066&amp;view=rev
Log:
caught up with Lucene trunk again

Modified:
    lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonMultiFieldQueryParser.java
    lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonQueryParser.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java
    lucene/pylucene/trunk/jcc/jcc/python.py
    lucene/pylucene/trunk/samples/IndexFiles.py
    lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py
    lucene/pylucene/trunk/samples/SearchFiles.py
    lucene/pylucene/trunk/samples/TermPositionVector.py
    lucene/pylucene/trunk/samples/ThreadIndexFiles.py
    lucene/pylucene/trunk/samples/manindex.py
    lucene/pylucene/trunk/samples/mansearch.py
    lucene/pylucene/trunk/test/test_Analyzers.py
    lucene/pylucene/trunk/test/test_BinaryDocument.py
    lucene/pylucene/trunk/test/test_BooleanOr.py
    lucene/pylucene/trunk/test/test_CachingWrapperFilter.py
    lucene/pylucene/trunk/test/test_Highlighter.py
    lucene/pylucene/trunk/test/test_Not.py
    lucene/pylucene/trunk/test/test_PhraseQuery.py
    lucene/pylucene/trunk/test/test_PositionIncrement.py
    lucene/pylucene/trunk/test/test_PyLucene.py
    lucene/pylucene/trunk/test/test_PyLuceneThread.py
    lucene/pylucene/trunk/test/test_PythonQueryParser.py
    lucene/pylucene/trunk/test/test_RewriteQuery.py
    lucene/pylucene/trunk/test/test_Similarity.py
    lucene/pylucene/trunk/test/test_StopAnalyzer.py
    lucene/pylucene/trunk/test/test_StopWords.py
    lucene/pylucene/trunk/test/test_ThaiAnalyzer.py
    lucene/pylucene/trunk/test/test_bug1564.py
    lucene/pylucene/trunk/test/test_bug1763.py
    lucene/pylucene/trunk/test/test_bug1842.py

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonMultiFieldQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonMultiFieldQueryParser.java?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonMultiFieldQueryParser.java
(original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonMultiFieldQueryParser.java
Tue Oct 27 05:57:19 2009
@@ -21,15 +21,17 @@
 import org.apache.lucene.search.Query;
 import org.apache.lucene.queryParser.MultiFieldQueryParser;
 import org.apache.lucene.queryParser.ParseException;
+import org.apache.lucene.util.Version;
 
 
 public class PythonMultiFieldQueryParser extends MultiFieldQueryParser {
 
     private long pythonObject;
 
-    public PythonMultiFieldQueryParser(String[] fields, Analyzer analyzer)
+    public PythonMultiFieldQueryParser(Version version, String[] fields,
+                                       Analyzer analyzer)
     {
-        super(fields, analyzer);
+        super(version, fields, analyzer);
     }
 
     public void pythonExtension(long pythonObject)

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonQueryParser.java?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonQueryParser.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/queryParser/PythonQueryParser.java Tue
Oct 27 05:57:19 2009
@@ -22,15 +22,16 @@
 import org.apache.lucene.queryParser.QueryParser;
 import org.apache.lucene.queryParser.CharStream;
 import org.apache.lucene.queryParser.ParseException;
+import org.apache.lucene.util.Version;
 
 
 public class PythonQueryParser extends QueryParser {
 
     private long pythonObject;
 
-    public PythonQueryParser(String field, Analyzer analyzer)
+    public PythonQueryParser(Version version, String field, Analyzer analyzer)
     {
-        super(field, analyzer);
+        super(version, field, analyzer);
     }
 
     public PythonQueryParser(CharStream stream)

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java Tue Oct 27
05:57:19 2009
@@ -45,7 +45,7 @@
         pythonDecRef();
     }
 
-    Scorer scorer;
+    protected Scorer scorer;
 
     public void setScorer(Scorer scorer)
         throws IOException

Modified: lucene/pylucene/trunk/jcc/jcc/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/python.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/python.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/python.py Tue Oct 27 05:57:19 2009
@@ -797,10 +797,8 @@
     if iteratorMethod:
         if iteratorExt:
             tp_iter = 'get_extension_iterator'
-        elif generics and clsParams:
-            tp_iter = '((PyObject *(*)(t_%s *)) get_generic_iterator&lt;t_%s&gt;)' %(names[-1],
names[-1])
         else:
-            tp_iter = '((PyObject *(*)(t_%s *)) get_iterator&lt;t_%s&gt;)' %(names[-1], names[-1])
+            tp_iter = '((PyObject *(*)(t_%s *)) get_%siterator&lt;t_%s&gt;)' %(names[-1],
clsParams and 'generic_' or '', names[-1])
         tp_iternext = '0'
     elif nextMethod and iterator.isAssignableFrom(cls):
         tp_iter = 'PyObject_SelfIter'
@@ -808,30 +806,24 @@
         ns, sep, n = rpartition(returnName, '::')
         if nextExt:
             tp_iternext = 'get_extension_next'
-        elif generics and clsParams:
-            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_generic_iterator_next&lt;java::util::t_Iterator,%s%st_%s&gt;)'
%(ns, sep, n)
         else:
-            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_iterator_next&lt;java::util::t_Iterator,%s%st_%s&gt;)'
%(ns, sep, n)
+            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_%siterator_next&lt;java::util::t_Iterator,%s%st_%s&gt;)'
%(clsParams and 'generic_' or '', ns, sep, n)
     elif nextElementMethod and enumeration.isAssignableFrom(cls):
         tp_iter = 'PyObject_SelfIter'
         returnName = typename(nextElementMethod.getReturnType(), cls, False)
         ns, sep, n = rpartition(returnName, '::')
         if nextElementExt:
             tp_iternext = 'get_extension_nextElement'
-        elif generics and clsParams:
-            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_generic_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s&gt;)'
%(ns, sep, n)
         else:
-            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s&gt;)'
%(ns, sep, n)
+            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_%senumeration_next&lt;java::util::t_Enumeration,%s%st_%s&gt;)'
%(clsParams and 'generic_' or '', ns, sep, n)
     elif nextMethod:
         tp_iter = 'PyObject_SelfIter'
         returnName = typename(nextMethod.getReturnType(), cls, False)
         ns, sep, n = rpartition(returnName, '::')
         if nextExt:
             tp_iternext = 'get_extension_next'
-        elif generics and clsParams:
-            tp_iternext = '((PyObject *(*)(t_%s *)) get_generic_next&lt;t_%s,%s%st_%s,%s&gt;)'
%(names[-1], names[-1], ns, sep, n, returnName)
         else:
-            tp_iternext = '((PyObject *(*)(t_%s *)) get_next&lt;t_%s,%s%st_%s,%s&gt;)' %(names[-1],
names[-1], ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(t_%s *)) get_%snext&lt;t_%s,%s%st_%s,%s&gt;)'
%(names[-1], clsParams and 'generic_' or '', names[-1], ns, sep, n, returnName)
     else:
         tp_iter = '0'
         tp_iternext = '0'

Modified: lucene/pylucene/trunk/samples/IndexFiles.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/IndexFiles.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/IndexFiles.py (original)
+++ lucene/pylucene/trunk/samples/IndexFiles.py Tue Oct 27 05:57:19 2009
@@ -79,7 +79,7 @@
     print 'lucene', lucene.VERSION
     start = datetime.now()
     try:
-        IndexFiles(sys.argv[1], "index", lucene.StandardAnalyzer())
+        IndexFiles(sys.argv[1], "index", lucene.StandardAnalyzer(lucene.Version.LUCENE_CURRENT))
         end = datetime.now()
         print end - start
     except Exception, e:

Modified: lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py (original)
+++ lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py Tue Oct 27 05:57:19 2009
@@ -36,11 +36,11 @@
 
     def tokenStream(self, fieldName, reader):
 
-        result = StandardTokenizer(reader)
+        result = StandardTokenizer(Version.LUCENE_CURRENT, reader)
         result = StandardFilter(result)
         result = LowerCaseFilter(result)
         result = PorterStemFilter(result)
-        result = StopFilter(result, StopAnalyzer.ENGLISH_STOP_WORDS)
+        result = StopFilter(True, result, StopAnalyzer.ENGLISH_STOP_WORDS_SET)
 
         return result
 

Modified: lucene/pylucene/trunk/samples/SearchFiles.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/SearchFiles.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/SearchFiles.py (original)
+++ lucene/pylucene/trunk/samples/SearchFiles.py Tue Oct 27 05:57:19 2009
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 from lucene import \
     QueryParser, IndexSearcher, StandardAnalyzer, SimpleFSDirectory, File, \
-    VERSION, initVM
+    VERSION, initVM, Version
 
 
 """
@@ -23,7 +23,8 @@
 
         print
         print "Searching for:", command
-        query = QueryParser("contents", analyzer).parse(command)
+        query = QueryParser(Version.LUCENE_CURRENT, "contents",
+                            analyzer).parse(command)
         scoreDocs = searcher.search(query, 50).scoreDocs
         print "%s total matching documents." % len(scoreDocs)
 
@@ -38,6 +39,6 @@
     print 'lucene', VERSION
     directory = SimpleFSDirectory(File(STORE_DIR))
     searcher = IndexSearcher(directory, True)
-    analyzer = StandardAnalyzer()
+    analyzer = StandardAnalyzer(Version.LUCENE_CURRENT)
     run(searcher, analyzer)
     searcher.close()

Modified: lucene/pylucene/trunk/samples/TermPositionVector.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/TermPositionVector.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/TermPositionVector.py (original)
+++ lucene/pylucene/trunk/samples/TermPositionVector.py Tue Oct 27 05:57:19 2009
@@ -1,13 +1,13 @@
 from lucene import \
-    StandardAnalyzer, RAMDirectory, Document, Field, \
+    StandardAnalyzer, RAMDirectory, Document, Field, Version, \
     IndexWriter, IndexReader, TermPositionVector, initVM
 
 if __name__ == '__main__':
     initVM()
 
 directory = RAMDirectory()
-iwriter = IndexWriter(directory, StandardAnalyzer(), True,
-                      IndexWriter.MaxFieldLength.LIMITED)
+iwriter = IndexWriter(directory, StandardAnalyzer(Version.LUCENE_CURRENT),
+                      True, IndexWriter.MaxFieldLength.LIMITED)
 ts = ["this bernhard is the text to be index text",
       "this claudia is the text to be index"]
 for t in ts:

Modified: lucene/pylucene/trunk/samples/ThreadIndexFiles.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/ThreadIndexFiles.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/ThreadIndexFiles.py (original)
+++ lucene/pylucene/trunk/samples/ThreadIndexFiles.py Tue Oct 27 05:57:19 2009
@@ -17,7 +17,7 @@
 import sys, os, threading
 
 from datetime import datetime
-from lucene import StandardAnalyzer, VERSION, initVM
+from lucene import StandardAnalyzer, VERSION, initVM, Version
 from IndexFiles import IndexFiles
 
 
@@ -31,7 +31,8 @@
     def fn():
         env.attachCurrentThread()
         start = datetime.now()
-        IndexFiles(sys.argv[1], "index", StandardAnalyzer())
+        IndexFiles(sys.argv[1], "index",
+                   StandardAnalyzer(Version.LUCENE_CURRENT))
         end = datetime.now()
         print end - start
 

Modified: lucene/pylucene/trunk/samples/manindex.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/manindex.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/manindex.py (original)
+++ lucene/pylucene/trunk/samples/manindex.py Tue Oct 27 05:57:19 2009
@@ -21,7 +21,7 @@
 import os, re, sys
 from subprocess import *
 from lucene import IndexWriter, StandardAnalyzer, Document, Field
-from lucene import SimpleFSDirectory, File, initVM
+from lucene import SimpleFSDirectory, File, initVM, Version
 
 def indexDirectory(dir):
 
@@ -87,7 +87,7 @@
         initVM()
         indexDir = sys.argv[1]
         writer = IndexWriter(SimpleFSDirectory(File(indexDir)),
-                             StandardAnalyzer(), True,
+                             StandardAnalyzer(Version.LUCENE_CURRENT), True,
                              IndexWriter.MaxFieldLength.LIMITED)
         manpath = os.environ.get('MANPATH', '/usr/share/man').split(os.pathsep)
         for dir in manpath:

Modified: lucene/pylucene/trunk/samples/mansearch.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/mansearch.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/mansearch.py (original)
+++ lucene/pylucene/trunk/samples/mansearch.py Tue Oct 27 05:57:19 2009
@@ -29,7 +29,7 @@
 
 from lucene import \
      Document, IndexSearcher, SimpleFSDirectory, File, QueryParser, \
-     StandardAnalyzer, initVM
+     StandardAnalyzer, initVM, Version
 
 if __name__ == '__main__':
     initVM()
@@ -65,7 +65,7 @@
 fsDir = SimpleFSDirectory(File(indexDir))
 searcher = IndexSearcher(fsDir, True)
 
-parser = QueryParser("keywords", StandardAnalyzer())
+parser = QueryParser("keywords", StandardAnalyzer(Version.LUCENE_CURRENT))
 parser.setDefaultOperator(QueryParser.Operator.AND)
 query = parser.parse(' '.join(args))
 start = datetime.now()

Modified: lucene/pylucene/trunk/test/test_Analyzers.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Analyzers.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Analyzers.py (original)
+++ lucene/pylucene/trunk/test/test_Analyzers.py Tue Oct 27 05:57:19 2009
@@ -65,7 +65,7 @@
 
     def testStop(self):
 
-        a = StopAnalyzer()
+        a = StopAnalyzer(Version.LUCENE_CURRENT)
         self._assertAnalyzesTo(a, "foo bar FOO BAR", 
                                [ "foo", "bar", "foo", "bar" ])
         self._assertAnalyzesTo(a, "foo a bar such FOO THESE BAR", 

Modified: lucene/pylucene/trunk/test/test_BinaryDocument.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_BinaryDocument.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_BinaryDocument.py (original)
+++ lucene/pylucene/trunk/test/test_BinaryDocument.py Tue Oct 27 05:57:19 2009
@@ -47,8 +47,8 @@
     
         # add the doc to a ram index
         dir = RAMDirectory()
-        writer = IndexWriter(dir, StandardAnalyzer(), True,
-                             IndexWriter.MaxFieldLength.LIMITED)
+        writer = IndexWriter(dir, StandardAnalyzer(Version.LUCENE_CURRENT),
+                             True, IndexWriter.MaxFieldLength.LIMITED)
         writer.addDocument(doc)
         writer.close()
     
@@ -87,8 +87,8 @@
     
         # add the doc to a ram index
         dir = RAMDirectory()
-        writer = IndexWriter(dir, StandardAnalyzer(), True,
-                             IndexWriter.MaxFieldLength.LIMITED)
+        writer = IndexWriter(dir, StandardAnalyzer(Version.LUCENE_CURRENT),
+                             True, IndexWriter.MaxFieldLength.LIMITED)
         writer.addDocument(doc)
         writer.close()
     

Modified: lucene/pylucene/trunk/test/test_BooleanOr.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_BooleanOr.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_BooleanOr.py (original)
+++ lucene/pylucene/trunk/test/test_BooleanOr.py Tue Oct 27 05:57:19 2009
@@ -38,8 +38,8 @@
     def setUp(self):
 
         rd = RAMDirectory()
-        writer = IndexWriter(rd, StandardAnalyzer(), True,
-                             IndexWriter.MaxFieldLength.LIMITED)
+        writer = IndexWriter(rd, StandardAnalyzer(Version.LUCENE_CURRENT),
+                             True, IndexWriter.MaxFieldLength.LIMITED)
 
         d = Document()
         d.add(Field(self.FIELD_T,

Modified: lucene/pylucene/trunk/test/test_CachingWrapperFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_CachingWrapperFilter.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_CachingWrapperFilter.py (original)
+++ lucene/pylucene/trunk/test/test_CachingWrapperFilter.py Tue Oct 27 05:57:19 2009
@@ -24,8 +24,8 @@
     def testCachingWorks(self):
 
         dir = RAMDirectory()
-        writer = IndexWriter(dir, StandardAnalyzer(), True,
-                             IndexWriter.MaxFieldLength.LIMITED)
+        writer = IndexWriter(dir, StandardAnalyzer(Version.LUCENE_CURRENT),
+                             True, IndexWriter.MaxFieldLength.LIMITED)
         writer.close()
 
         reader = IndexReader.open(dir, True)

Modified: lucene/pylucene/trunk/test/test_Highlighter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Highlighter.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Highlighter.py (original)
+++ lucene/pylucene/trunk/test/test_Highlighter.py Tue Oct 27 05:57:19 2009
@@ -47,7 +47,8 @@
     def __init__(self, *args):
 
         super(HighlighterTestCase, self).__init__(*args)
-        self.parser = QueryParser(self.FIELD_NAME, StandardAnalyzer())
+        self.parser = QueryParser(Version.LUCENE_CURRENT, self.FIELD_NAME,
+                                  StandardAnalyzer(Version.LUCENE_CURRENT))
 
     def testSimpleHighlighter(self):
 
@@ -114,7 +115,7 @@
         
     def setUp(self):
 
-        self.analyzer = StandardAnalyzer()
+        self.analyzer = StandardAnalyzer(Version.LUCENE_CURRENT)
         self.ramDir = RAMDirectory()
         writer = IndexWriter(self.ramDir, self.analyzer, True,
                              IndexWriter.MaxFieldLength.LIMITED)

Modified: lucene/pylucene/trunk/test/test_Not.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Not.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Not.py (original)
+++ lucene/pylucene/trunk/test/test_Not.py Tue Oct 27 05:57:19 2009
@@ -24,8 +24,8 @@
     def testNot(self):
 
         store = RAMDirectory()
-        writer = IndexWriter(store, SimpleAnalyzer(), True,
-                             IndexWriter.MaxFieldLength.LIMITED)
+        writer = IndexWriter(store, SimpleAnalyzer(Version.LUCENE_CURRENT),
+                             True, IndexWriter.MaxFieldLength.LIMITED)
 
         d1 = Document()
         d1.add(Field("field", "a b", Field.Store.YES, Field.Index.ANALYZED))
@@ -35,7 +35,8 @@
         writer.close()
 
         searcher = IndexSearcher(store, True)
-        query = QueryParser("field", SimpleAnalyzer()).parse("a NOT b")
+        query = QueryParser(Version.LUCENE_CURRENT, "field",
+                            SimpleAnalyzer(Version.LUCENE_CURRENT)).parse("a NOT b")
 
         topDocs = searcher.search(query, 50)
         self.assertEqual(0, topDocs.totalHits)

Modified: lucene/pylucene/trunk/test/test_PhraseQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PhraseQuery.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PhraseQuery.py (original)
+++ lucene/pylucene/trunk/test/test_PhraseQuery.py Tue Oct 27 05:57:19 2009
@@ -140,7 +140,7 @@
     def testPhraseQueryWithStopAnalyzer(self):
 
         directory = RAMDirectory()
-        stopAnalyzer = StopAnalyzer()
+        stopAnalyzer = StopAnalyzer(Version.LUCENE_24)
         writer = IndexWriter(directory, stopAnalyzer, True,
                              IndexWriter.MaxFieldLength.LIMITED)
         doc = Document()

Modified: lucene/pylucene/trunk/test/test_PositionIncrement.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PositionIncrement.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PositionIncrement.py (original)
+++ lucene/pylucene/trunk/test/test_PositionIncrement.py Tue Oct 27 05:57:19 2009
@@ -156,7 +156,8 @@
         self.assertEqual(0, len(hits))
 
         # should not find "1 2" because there is a gap of 1 in the index
-        qp = QueryParser("field", StopWhitespaceAnalyzer(False))
+        qp = QueryParser(Version.LUCENE_CURRENT, "field",
+                         StopWhitespaceAnalyzer(False))
         q = PhraseQuery.cast_(qp.parse("\"1 2\""))
         hits = searcher.search(q, None, 1000).scoreDocs
         self.assertEqual(0, len(hits))
@@ -183,7 +184,8 @@
       
         # when both qp qnd stopFilter propagate increments, we should find
         # the doc.
-        qp = QueryParser("field", StopWhitespaceAnalyzer(True))
+        qp = QueryParser(Version.LUCENE_CURRENT, "field",
+                         StopWhitespaceAnalyzer(True))
         qp.setEnablePositionIncrements(True)
         q = PhraseQuery.cast_(qp.parse("\"1 stop 2\""))
         hits = searcher.search(q, None, 1000).scoreDocs
@@ -278,7 +280,10 @@
     def tokenStream(self, fieldName, reader):
 
         ts = self.a.tokenStream(fieldName, reader)
-        return StopFilter(self.enablePositionIncrements, ts, ["stop"])
+        set = HashSet()
+        set.add("stop")
+
+        return StopFilter(self.enablePositionIncrements, ts, set)
 
 
 class TestPayloadAnalyzer(PythonAnalyzer):

Modified: lucene/pylucene/trunk/test/test_PyLucene.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PyLucene.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PyLucene.py (original)
+++ lucene/pylucene/trunk/test/test_PyLucene.py Tue Oct 27 05:57:19 2009
@@ -21,7 +21,7 @@
 class Test_PyLuceneBase(object):
 
     def getAnalyzer(self):
-        return StandardAnalyzer()
+        return StandardAnalyzer(Version.LUCENE_CURRENT)
 
     def openStore(self):
         raise NotImplemented
@@ -129,7 +129,8 @@
         searcher = None
         try:
             searcher = IndexSearcher(store, True)
-            query = QueryParser("title", self.getAnalyzer()).parse("value")
+            query = QueryParser(Version.LUCENE_CURRENT, "title",
+                                self.getAnalyzer()).parse("value")
             topDocs = searcher.search(query, 50)
             self.assertEqual(topDocs.totalHits, 1)
         finally:
@@ -146,8 +147,8 @@
         try:
             searcher = IndexSearcher(store, True)
             SHOULD = BooleanClause.Occur.SHOULD
-            query = MultiFieldQueryParser.parse("value",
-                                                ["title", "docid"],
+            query = MultiFieldQueryParser.parse(Version.LUCENE_CURRENT,
+                                                "value", ["title", "docid"],
                                                 [SHOULD, SHOULD],
                                                 self.getAnalyzer())
             topDocs = searcher.search(query, 50)
@@ -202,7 +203,8 @@
         searcher = None
         try:
             searcher = IndexSearcher(store, True)
-            query = QueryParser("title", self.getAnalyzer()).parse("value")
+            query = QueryParser(Version.LUCENE_CURRENT, "title",
+                                self.getAnalyzer()).parse("value")
             topDocs = searcher.search(query, 50)
             self.assertEqual(topDocs.totalHits, 0)
         finally:

Modified: lucene/pylucene/trunk/test/test_PyLuceneThread.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PyLuceneThread.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PyLuceneThread.py (original)
+++ lucene/pylucene/trunk/test/test_PyLuceneThread.py Tue Oct 27 05:57:19 2009
@@ -27,7 +27,8 @@
         self.classLoader = Thread.currentThread().getContextClassLoader()
 
         self.directory = RAMDirectory()
-        writer = IndexWriter(self.directory, StandardAnalyzer(), True,
+        writer = IndexWriter(self.directory,
+                             StandardAnalyzer(Version.LUCENE_CURRENT), True,
                              IndexWriter.MaxFieldLength.LIMITED)
 
         doc1 = Document()

Modified: lucene/pylucene/trunk/test/test_PythonQueryParser.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PythonQueryParser.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PythonQueryParser.py (original)
+++ lucene/pylucene/trunk/test/test_PythonQueryParser.py Tue Oct 27 05:57:19 2009
@@ -35,7 +35,8 @@
         class TestQueryParser(BooleanTestMixin, PythonQueryParser):
             pass
         
-        qp = TestQueryParser('all', StandardAnalyzer())
+        qp = TestQueryParser(Version.LUCENE_CURRENT, 'all',
+                             StandardAnalyzer(Version.LUCENE_CURRENT))
         q = qp.parse("foo bar")
         self.assertEquals(str(q), "all:foo all:bar all:extra_clause")
 
@@ -47,10 +48,11 @@
         class TestQueryParser(BooleanTestMixin, PythonMultiFieldQueryParser):
             pass
 
-        qp = TestQueryParser(['one', 'two'], StandardAnalyzer())
-        q = qp.parse("foo bar", ['one', 'two'],
+        qp = TestQueryParser(Version.LUCENE_CURRENT, ['one', 'two'],
+                             StandardAnalyzer(Version.LUCENE_CURRENT))
+        q = qp.parse(Version.LUCENE_CURRENT, "foo bar", ['one', 'two'],
                      [BooleanClause.Occur.SHOULD, BooleanClause.Occur.SHOULD],
-                     StandardAnalyzer())
+                     StandardAnalyzer(Version.LUCENE_CURRENT))
         self.assertEquals(str(q), "(one:foo one:bar) (two:foo two:bar)")
 
 

Modified: lucene/pylucene/trunk/test/test_RewriteQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_RewriteQuery.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_RewriteQuery.py (original)
+++ lucene/pylucene/trunk/test/test_RewriteQuery.py Tue Oct 27 05:57:19 2009
@@ -12,7 +12,8 @@
 #   limitations under the License.
 # ====================================================================
 
-import sys, lucene, unittest
+import sys, unittest
+from lucene import *
 
 
 # Originally intended to demonstrate a memory leak.  See
@@ -23,23 +24,23 @@
 
     def setUp(self):
 
-        store = lucene.RAMDirectory()
-        writer = lucene.IndexWriter(store, lucene.StandardAnalyzer(), True,
-                                    lucene.IndexWriter.MaxFieldLength.LIMITED)
+        store = RAMDirectory()
+        writer = IndexWriter(store, StandardAnalyzer(Version.LUCENE_CURRENT),
+                             True, IndexWriter.MaxFieldLength.LIMITED)
         writer.close()
-        self.reader = lucene.IndexSearcher(store, True).getIndexReader()
-        self.term = lucene.Term('all', 'foo')
+        self.reader = IndexSearcher(store, True).getIndexReader()
+        self.term = Term('all', 'foo')
         
     def testQuery(self):
 
-        base_query = lucene.TermQuery(self.term)
+        base_query = TermQuery(self.term)
         new_query = base_query.rewrite(self.reader)
 
         self.assertEquals(base_query, new_query)
     
 
 if __name__ == "__main__":
-    env = lucene.initVM()
+    env = initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:

Modified: lucene/pylucene/trunk/test/test_Similarity.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Similarity.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Similarity.py (original)
+++ lucene/pylucene/trunk/test/test_Similarity.py Tue Oct 27 05:57:19 2009
@@ -30,12 +30,6 @@
     def sloppyFreq(self, distance):
         return 2.0
 
-    def idfTerms(self, terms, searcher):
-        return 1.0
-
-    def idfTerm(self, term, searcher):
-        return 1.0
-
     def idf(self, docFreq, numDocs):
         return 1.0
 
@@ -74,17 +68,15 @@
         c = Term("field", "c")
 
         class collector1(PythonCollector):
-            def __init__(_self, score):
-                super(collector1, _self).__init__()
-                _self.score = score
             def collect(_self, doc, score):
-                self.assertEqual(score, _self.score)
+                self.assertEqual(1.0, score)
             def setNextReader(_self, reader, docBase):
                 pass
             def acceptsDocsOutOfOrder(_self):
                 return True
 
-        searcher.search(TermQuery(b), collector1(1.0))
+        searcher.search(TermQuery(b), collector1())
+
 
         bq = BooleanQuery()
         bq.add(TermQuery(a), BooleanClause.Occur.SHOULD)
@@ -92,22 +84,41 @@
 
         class collector2(PythonCollector):
             def collect(_self, doc, score):
-                self.assertEqual(score, doc + 1)
+                self.assertEqual(doc + _self.base + 1, score)
             def setNextReader(_self, reader, docBase):
-                pass
+                _self.base = docBase
             def acceptsDocsOutOfOrder(_self):
                 return True
 
         searcher.search(bq, collector2())
 
+
         pq = PhraseQuery()
         pq.add(a)
         pq.add(c)
 
-        searcher.search(pq, collector1(1.0))
+        class collector3(PythonCollector):
+            def collect(_self, doc, score):
+                self.assertEqual(1.0, score)
+            def setNextReader(_self, reader, docBase):
+                pass
+            def acceptsDocsOutOfOrder(_self):
+                return True
+
+        searcher.search(pq, collector3())
+
 
         pq.setSlop(2)
-        searcher.search(pq, collector1(2.0))
+
+        class collector4(PythonCollector):
+            def collect(_self, doc, score):
+                self.assertEqual(2.0, score)
+            def setNextReader(_self, reader, docBase):
+                pass
+            def acceptsDocsOutOfOrder(_self):
+                return True
+
+        searcher.search(pq, collector4())
 
 
 if __name__ == "__main__":

Modified: lucene/pylucene/trunk/test/test_StopAnalyzer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_StopAnalyzer.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_StopAnalyzer.py (original)
+++ lucene/pylucene/trunk/test/test_StopAnalyzer.py Tue Oct 27 05:57:19 2009
@@ -23,8 +23,8 @@
 
     def setUp(self):
 
-        self.stop = StopAnalyzer()
-        self.inValidTokens = StopAnalyzer.ENGLISH_STOP_WORDS[:]
+        self.stop = StopAnalyzer(Version.LUCENE_CURRENT)
+        self.invalidTokens = StopAnalyzer.ENGLISH_STOP_WORDS_SET
 
     def testDefaults(self):
 
@@ -36,13 +36,16 @@
         termAtt = stream.getAttribute(TermAttribute.class_)
     
         while stream.incrementToken():
-            self.assert_(termAtt.term() not in self.inValidTokens)
+            self.assert_(termAtt.term() not in self.invalidTokens)
 
     def testStopList(self):
 
-        stopWordsSet = ["good", "test", "analyzer"]
+        stopWords = ["good", "test", "analyzer"]
+        stopWordsSet = HashSet()
+        for stopWord in stopWords:
+            stopWordsSet.add(stopWord)
 
-        newStop = StopAnalyzer(stopWordsSet)
+        newStop = StopAnalyzer(Version.LUCENE_24, stopWordsSet)
         reader = StringReader("This is a good test of the english stop analyzer")
         stream = newStop.tokenStream("test", reader)
         self.assert_(stream is not None)
@@ -58,29 +61,27 @@
 
     def testStopListPositions(self):
         
-        defaultEnable = StopFilter.getEnablePositionIncrementsDefault()
-        StopFilter.setEnablePositionIncrementsDefault(True)
+        stopWords = ["good", "test", "analyzer"]
+        stopWordsSet = HashSet()
+        for stopWord in stopWords:
+            stopWordsSet.add(stopWord)
+
+        newStop = StopAnalyzer(Version.LUCENE_CURRENT, stopWordsSet)
+        reader = StringReader("This is a good test of the english stop analyzer with positions")
+        expectedIncr = [ 1,   1, 1,          3, 1,  1,      1,            2,   1]
+        stream = newStop.tokenStream("test", reader)
+        self.assert_(stream is not None)
+
+        i = 0
+        termAtt = stream.getAttribute(TermAttribute.class_)
+        posIncrAtt = stream.addAttribute(PositionIncrementAttribute.class_)
 
-        try:
-            stopWordsSet = ["good", "test", "analyzer"]
-            newStop = StopAnalyzer(stopWordsSet)
-            reader = StringReader("This is a good test of the english stop analyzer with
positions")
-            expectedIncr = [ 1,   1, 1,          3, 1,  1,      1,            2,   1]
-            stream = newStop.tokenStream("test", reader)
-            self.assert_(stream is not None)
-
-            i = 0
-            termAtt = stream.getAttribute(TermAttribute.class_)
-            posIncrAtt = stream.addAttribute(PositionIncrementAttribute.class_)
-
-            while stream.incrementToken():
-                text = termAtt.term()
-                self.assert_(text not in stopWordsSet)
-                self.assertEqual(expectedIncr[i],
-                                 posIncrAtt.getPositionIncrement())
-                i += 1
-        finally:
-            StopFilter.setEnablePositionIncrementsDefault(defaultEnable)
+        while stream.incrementToken():
+            text = termAtt.term()
+            self.assert_(text not in stopWordsSet)
+            self.assertEqual(expectedIncr[i],
+                             posIncrAtt.getPositionIncrement())
+            i += 1
 
 
 if __name__ == "__main__":

Modified: lucene/pylucene/trunk/test/test_StopWords.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_StopWords.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_StopWords.py (original)
+++ lucene/pylucene/trunk/test/test_StopWords.py Tue Oct 27 05:57:19 2009
@@ -22,14 +22,18 @@
 
     def setUp(self):
 
-        self.stop_set = ['the', 'and', 's']
+        stopWords = ['the', 'and', 's']
+        self.stop_set = HashSet()
+        for stopWord in stopWords:
+            self.stop_set.add(stopWord)
+
         self.reader = StringReader('foo')
 
     def testStopWords(self):
 
         try:
-            result = StandardTokenizer(self.reader)
-            result = StopFilter(result, self.stop_set)
+            result = StandardTokenizer(Version.LUCENE_CURRENT, self.reader)
+            result = StopFilter(True, result, self.stop_set)
         except Exception, e:
             self.fail(str(e))
 

Modified: lucene/pylucene/trunk/test/test_ThaiAnalyzer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_ThaiAnalyzer.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_ThaiAnalyzer.py (original)
+++ lucene/pylucene/trunk/test/test_ThaiAnalyzer.py Tue Oct 27 05:57:19 2009
@@ -14,7 +14,7 @@
 # ====================================================================
 
 from unittest import TestCase, main
-from lucene import ThaiAnalyzer, StringReader
+from lucene import ThaiAnalyzer, StringReader, Version
 from BaseTokenStreamTestCase import BaseTokenStreamTestCase
 
 
@@ -22,7 +22,7 @@
 
     def testAnalyzer(self):
 
-        analyzer = ThaiAnalyzer()
+        analyzer = ThaiAnalyzer(Version.LUCENE_CURRENT)
     
         self._assertAnalyzesTo(analyzer, u"", [])
 

Modified: lucene/pylucene/trunk/test/test_bug1564.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_bug1564.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_bug1564.py (original)
+++ lucene/pylucene/trunk/test/test_bug1564.py Tue Oct 27 05:57:19 2009
@@ -19,7 +19,7 @@
 
     def setUp(self):
 
-        self.analyzer = StandardAnalyzer()
+        self.analyzer = StandardAnalyzer(Version.LUCENE_CURRENT)
         self.store = RAMDirectory()
 
         writer = IndexWriter(self.store, self.analyzer, True,
@@ -41,7 +41,8 @@
     def test_bug1564(self):
 
         searcher = IndexSearcher(self.store, True)
-        query = QueryParser('all', self.analyzer).parse('supreme')
+        query = QueryParser(Version.LUCENE_CURRENT, 'all',
+                            self.analyzer).parse('supreme')
         topDocs = searcher.search(query, 50)
         self.assertEqual(topDocs.totalHits, 1)
 

Modified: lucene/pylucene/trunk/test/test_bug1763.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_bug1763.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_bug1763.py (original)
+++ lucene/pylucene/trunk/test/test_bug1763.py Tue Oct 27 05:57:19 2009
@@ -19,7 +19,7 @@
 
     def setUp(self):
 
-        self.analyzer = StandardAnalyzer()
+        self.analyzer = StandardAnalyzer(Version.LUCENE_CURRENT)
         self.d1 = RAMDirectory()
         self.d2 = RAMDirectory()
         
@@ -53,7 +53,8 @@
         w1.close()
 
         searcher = IndexSearcher(self.d1, True)
-        q = QueryParser('all', self.analyzer).parse('brown')
+        q = QueryParser(Version.LUCENE_CURRENT, 'all',
+                        self.analyzer).parse('brown')
         topDocs = searcher.search(q, 50)
         self.assertEqual(searcher.doc(topDocs.scoreDocs[0].doc).get('id'), '2')
 

Modified: lucene/pylucene/trunk/test/test_bug1842.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_bug1842.py?rev=830066&amp;r1=830065&amp;r2=830066&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_bug1842.py (original)
+++ lucene/pylucene/trunk/test/test_bug1842.py Tue Oct 27 05:57:19 2009
@@ -19,7 +19,7 @@
 
     def setUp(self):
 
-        self.analyzer = StandardAnalyzer()
+        self.analyzer = StandardAnalyzer(Version.LUCENE_CURRENT)
         self.d1 = RAMDirectory()
         
         w1 = IndexWriter(self.d1, self.analyzer, True,




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r826864 - in /lucene/pylucene/trunk/jcc: CHANGES jcc/python.py jcc/sources/JArray.h jcc/sources/JCCEnv.cpp jcc/sources/JCCEnv.h jcc/sources/JObject.h jcc/sources/functions.cpp jcc/sources/functions.h jcc/sources/jcc.cpp</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091019230805.B600E238888F@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091019230805-B600E238888F@eris-apache-org%3e</id>
<updated>2009-10-19T23:08:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Mon Oct 19 23:08:04 2009
New Revision: 826864

URL: http://svn.apache.org/viewvc?rev=826864&amp;view=rev
Log:
 - reworked iterator and enumeration 'next' templates to shortcut C++ wrappers

Modified:
    lucene/pylucene/trunk/jcc/CHANGES
    lucene/pylucene/trunk/jcc/jcc/python.py
    lucene/pylucene/trunk/jcc/jcc/sources/JArray.h
    lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.cpp
    lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.h
    lucene/pylucene/trunk/jcc/jcc/sources/JObject.h
    lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp
    lucene/pylucene/trunk/jcc/jcc/sources/functions.h
    lucene/pylucene/trunk/jcc/jcc/sources/jcc.cpp

Modified: lucene/pylucene/trunk/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/CHANGES?rev=826864&amp;r1=826863&amp;r2=826864&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/CHANGES (original)
+++ lucene/pylucene/trunk/jcc/CHANGES Mon Oct 19 23:08:04 2009
@@ -7,6 +7,7 @@
  - added (partial) support for Java generics
  - added 'string_' property to JArray('byte') instances to extract byte string
  - fixed bug with passing list of extension objects
+ - reworked iterator and enumeration 'next' templates to shortcut C++ wrappers
  - 
 
 Version 2.3 -&gt; 2.4

Modified: lucene/pylucene/trunk/jcc/jcc/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/python.py?rev=826864&amp;r1=826863&amp;r2=826864&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/python.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/python.py Mon Oct 19 23:08:04 2009
@@ -49,7 +49,7 @@
              'int': ('i', '(int) %s', False),
              'long': ('L', '(long long) %s', False),
              'short': ('i', '(int) %s', False),
-             'java.lang.String': ('O', 'env-&gt;fromJString((jstring) %s)', True) }
+             'java.lang.String': ('O', 'env-&gt;fromJString((jstring) %s, 0)', True) }
 
 
 def parseArgs(params, current, generics):
@@ -809,9 +809,9 @@
         if nextExt:
             tp_iternext = 'get_extension_next'
         elif generics and clsParams:
-            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_generic_iterator_next&lt;java::util::t_Iterator,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_generic_iterator_next&lt;java::util::t_Iterator,%s%st_%s&gt;)'
%(ns, sep, n)
         else:
-            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_iterator_next&lt;java::util::t_Iterator,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_iterator_next&lt;java::util::t_Iterator,%s%st_%s&gt;)'
%(ns, sep, n)
     elif nextElementMethod and enumeration.isAssignableFrom(cls):
         tp_iter = 'PyObject_SelfIter'
         returnName = typename(nextElementMethod.getReturnType(), cls, False)
@@ -819,9 +819,9 @@
         if nextElementExt:
             tp_iternext = 'get_extension_nextElement'
         elif generics and clsParams:
-            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_generic_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_generic_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s&gt;)'
%(ns, sep, n)
         else:
-            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
+            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s&gt;)'
%(ns, sep, n)
     elif nextMethod:
         tp_iter = 'PyObject_SelfIter'
         returnName = typename(nextMethod.getReturnType(), cls, False)

Modified: lucene/pylucene/trunk/jcc/jcc/sources/JArray.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/JArray.h?rev=826864&amp;r1=826863&amp;r2=826864&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/JArray.h (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/JArray.h Mon Oct 19 23:08:04 2009
@@ -272,9 +272,8 @@
         for (int i = lo; i &lt; hi; i++) {
             jstring str = (jstring)
                 env-&gt;getObjectArrayElement((jobjectArray) this$, i);
-            PyObject *obj = env-&gt;fromJString(str);
+            PyObject *obj = env-&gt;fromJString(str, 1);
 
-            env-&gt;get_vm_env()-&gt;DeleteLocalRef(str);
             PyList_SET_ITEM(list, i - lo, obj);
         }
          
@@ -292,9 +291,8 @@
             {
                 jstring str = (jstring)
                     env-&gt;getObjectArrayElement((jobjectArray) this$, n);
-                PyObject *obj = env-&gt;fromJString(str);
+                PyObject *obj = env-&gt;fromJString(str, 1);
 
-                env-&gt;get_vm_env()-&gt;DeleteLocalRef(str);
                 return obj;
             }
         }

Modified: lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.cpp?rev=826864&amp;r1=826863&amp;r2=826864&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.cpp (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.cpp Mon Oct 19 23:08:04 2009
@@ -109,6 +109,13 @@
     _mids[mid_obj_getClass] =
         vm_env-&gt;GetMethodID(_obj, "getClass",
                             "()Ljava/lang/Class;");
+
+    _mids[mid_iterator_next] =
+        vm_env-&gt;GetMethodID(vm_env-&gt;FindClass("java/util/Iterator"),
+                            "next", "()Ljava/lang/Object;");
+    _mids[mid_enumeration_nextElement] =
+        vm_env-&gt;GetMethodID(vm_env-&gt;FindClass("java/util/Enumeration"),
+                            "nextElement", "()Ljava/lang/Object;");
 }
 
 #if defined(_MSC_VER) || defined(__WIN32)
@@ -131,19 +138,29 @@
 
 #endif
 
-jint JCCEnv::getJNIVersion()
+jint JCCEnv::getJNIVersion() const
 {
     return get_vm_env()-&gt;GetVersion();
 }
 
-jstring JCCEnv::getJavaVersion()
+jstring JCCEnv::getJavaVersion() const
 {
     return (jstring)
         callStaticObjectMethod(_sys, _mids[mid_sys_getProperty],
                                get_vm_env()-&gt;NewStringUTF("java.version"));
 }
 
-jclass JCCEnv::findClass(const char *className)
+jobject JCCEnv::iteratorNext(jobject obj) const
+{
+    return callObjectMethod(obj, _mids[mid_iterator_next]);
+}
+
+jobject JCCEnv::enumerationNext(jobject obj) const
+{
+    return callObjectMethod(obj, _mids[mid_enumeration_nextElement]);
+}
+
+jclass JCCEnv::findClass(const char *className) const
 {
     jclass cls = NULL;
 
@@ -184,7 +201,7 @@
     return cls;
 }
 
-void JCCEnv::registerNatives(jclass cls, JNINativeMethod *methods, int n)
+void JCCEnv::registerNatives(jclass cls, JNINativeMethod *methods, int n) const
 {
     get_vm_env()-&gt;RegisterNatives(cls, methods, n);
 }
@@ -309,13 +326,14 @@
     return array;
 }
 
-void JCCEnv::setObjectArrayElement(jobjectArray array, int n, jobject obj)
+void JCCEnv::setObjectArrayElement(jobjectArray array, int n,
+                                   jobject obj) const
 {
     get_vm_env()-&gt;SetObjectArrayElement(array, n, obj);
     reportException();
 }
 
-jobject JCCEnv::getObjectArrayElement(jobjectArray array, int n)
+jobject JCCEnv::getObjectArrayElement(jobjectArray array, int n) const
 {
     jobject obj = get_vm_env()-&gt;GetObjectArrayElement(array, n);
 
@@ -323,7 +341,7 @@
     return obj;
 }
 
-int JCCEnv::getArrayLength(jarray array)
+int JCCEnv::getArrayLength(jarray array) const
 {
     int len = get_vm_env()-&gt;GetArrayLength(array);
 
@@ -331,12 +349,14 @@
     return len;
 }
 
-jclass JCCEnv::getPythonExceptionClass()
+#ifdef PYTHON
+jclass JCCEnv::getPythonExceptionClass() const
 {
     return _thr;
 }
+#endif
 
-void JCCEnv::reportException()
+void JCCEnv::reportException() const
 {
     JNIEnv *vm_env = get_vm_env();
     jthrowable throwable = vm_env-&gt;ExceptionOccurred();
@@ -368,42 +388,42 @@
 }
 
 
-#define DEFINE_CALL(jtype, Type)                                        \
-    jtype JCCEnv::call##Type##Method(jobject obj,                       \
-                                     jmethodID mid, ...)                \
-    {                                                                   \
-        va_list ap;                                                     \
-        jtype result;                                                   \
-                                                                        \
-        va_start(ap, mid);                                              \
-        result = get_vm_env()-&gt;Call##Type##MethodV(obj, mid, ap);       \
-        va_end(ap);                                                     \
-                                                                        \
-        reportException();                                              \
-                                                                        \
-        return result;                                                  \
+#define DEFINE_CALL(jtype, Type)                                         \
+    jtype JCCEnv::call##Type##Method(jobject obj,                        \
+                                     jmethodID mid, ...) const           \
+    {                                                                    \
+        va_list ap;                                                      \
+        jtype result;                                                    \
+                                                                         \
+        va_start(ap, mid);                                               \
+        result = get_vm_env()-&gt;Call##Type##MethodV(obj, mid, ap);        \
+        va_end(ap);                                                      \
+                                                                         \
+        reportException();                                               \
+                                                                         \
+        return result;                                                   \
     }
 
-#define DEFINE_NONVIRTUAL_CALL(jtype, Type)                             \
-    jtype JCCEnv::callNonvirtual##Type##Method(jobject obj, jclass cls, \
-                                               jmethodID mid, ...)      \
-    {                                                                   \
-        va_list ap;                                                     \
-        jtype result;                                                   \
-                                                                        \
-        va_start(ap, mid);                                              \
-        result = get_vm_env()-&gt;CallNonvirtual##Type##MethodV(obj, cls,  \
-                                                             mid, ap);  \
-        va_end(ap);                                                     \
-                                                                        \
-        reportException();                                              \
-                                                                        \
-        return result;                                                  \
+#define DEFINE_NONVIRTUAL_CALL(jtype, Type)                              \
+    jtype JCCEnv::callNonvirtual##Type##Method(jobject obj, jclass cls,  \
+                                               jmethodID mid, ...) const \
+    {                                                                    \
+        va_list ap;                                                      \
+        jtype result;                                                    \
+                                                                         \
+        va_start(ap, mid);                                               \
+        result = get_vm_env()-&gt;CallNonvirtual##Type##MethodV(obj, cls,   \
+                                                             mid, ap);   \
+        va_end(ap);                                                      \
+                                                                         \
+        reportException();                                               \
+                                                                         \
+        return result;                                                   \
     }
 
 #define DEFINE_STATIC_CALL(jtype, Type)                                 \
     jtype JCCEnv::callStatic##Type##Method(jclass cls,                  \
-                                           jmethodID mid, ...)          \
+                                           jmethodID mid, ...) const    \
     {                                                                   \
         va_list ap;                                                     \
         jtype result;                                                   \
@@ -447,7 +467,7 @@
 DEFINE_STATIC_CALL(jlong, Long)
 DEFINE_STATIC_CALL(jshort, Short)
 
-void JCCEnv::callVoidMethod(jobject obj, jmethodID mid, ...)
+void JCCEnv::callVoidMethod(jobject obj, jmethodID mid, ...) const
 {
     va_list ap;
 
@@ -459,7 +479,7 @@
 }
 
 void JCCEnv::callNonvirtualVoidMethod(jobject obj, jclass cls,
-                                      jmethodID mid, ...)
+                                      jmethodID mid, ...) const
 {
     va_list ap;
 
@@ -470,7 +490,7 @@
     reportException();
 }
 
-void JCCEnv::callStaticVoidMethod(jclass cls, jmethodID mid, ...)
+void JCCEnv::callStaticVoidMethod(jclass cls, jmethodID mid, ...) const
 {
     va_list ap;
 
@@ -483,7 +503,7 @@
 
 
 jmethodID JCCEnv::getMethodID(jclass cls, const char *name,
-                              const char *signature)
+                              const char *signature) const
 {
     jmethodID id = get_vm_env()-&gt;GetMethodID(cls, name, signature);
 
@@ -493,7 +513,7 @@
 }
 
 jfieldID JCCEnv::getFieldID(jclass cls, const char *name,
-                            const char *signature)
+                            const char *signature) const
 {
     jfieldID id = get_vm_env()-&gt;GetFieldID(cls, name, signature);
 
@@ -504,7 +524,7 @@
 
 
 jmethodID JCCEnv::getStaticMethodID(jclass cls, const char *name,
-                                    const char *signature)
+                                    const char *signature) const
 {
     jmethodID id = get_vm_env()-&gt;GetStaticMethodID(cls, name, signature);
 
@@ -514,7 +534,7 @@
 }
 
 jobject JCCEnv::getStaticObjectField(jclass cls, const char *name,
-                                     const char *signature)
+                                     const char *signature) const
 {
     JNIEnv *vm_env = get_vm_env();
     jfieldID id = vm_env-&gt;GetStaticFieldID(cls, name, signature);
@@ -525,7 +545,8 @@
 }
 
 #define DEFINE_GET_STATIC_FIELD(jtype, Type, signature)                 \
-    jtype JCCEnv::getStatic##Type##Field(jclass cls, const char *name)  \
+    jtype JCCEnv::getStatic##Type##Field(jclass cls,                    \
+                                         const char *name) const        \
     {                                                                   \
         JNIEnv *vm_env = get_vm_env();                                  \
         jfieldID id = vm_env-&gt;GetStaticFieldID(cls, name, #signature);  \
@@ -543,7 +564,7 @@
 DEFINE_GET_STATIC_FIELD(jshort, Short, S)
 
 #define DEFINE_GET_FIELD(jtype, Type)                                   \
-    jtype JCCEnv::get##Type##Field(jobject obj, jfieldID id)            \
+    jtype JCCEnv::get##Type##Field(jobject obj, jfieldID id) const      \
     {                                                                   \
         jtype value = get_vm_env()-&gt;Get##Type##Field(obj, id);          \
         reportException();                                              \
@@ -560,11 +581,12 @@
 DEFINE_GET_FIELD(jlong, Long)
 DEFINE_GET_FIELD(jshort, Short)
 
-#define DEFINE_SET_FIELD(jtype, Type)                                    \
-    void JCCEnv::set##Type##Field(jobject obj, jfieldID id, jtype value) \
-    {                                                                    \
-        get_vm_env()-&gt;Set##Type##Field(obj, id, value);                  \
-        reportException();                                               \
+#define DEFINE_SET_FIELD(jtype, Type)                                   \
+    void JCCEnv::set##Type##Field(jobject obj, jfieldID id,             \
+                                  jtype value) const                    \
+    {                                                                   \
+        get_vm_env()-&gt;Set##Type##Field(obj, id, value);                 \
+        reportException();                                              \
     }
 
 DEFINE_SET_FIELD(jobject, Object)
@@ -607,7 +629,7 @@
     free(path);
 }
 
-jstring JCCEnv::fromUTF(const char *bytes)
+jstring JCCEnv::fromUTF(const char *bytes) const
 {
     jstring str = get_vm_env()-&gt;NewStringUTF(bytes);
 
@@ -616,7 +638,7 @@
     return str;
 }
 
-char *JCCEnv::toUTF(jstring str)
+char *JCCEnv::toUTF(jstring str) const
 {
     JNIEnv *vm_env = get_vm_env();
     int len = vm_env-&gt;GetStringUTFLength(str);
@@ -635,14 +657,14 @@
     return bytes;
 }
 
-char *JCCEnv::toString(jobject obj)
+char *JCCEnv::toString(jobject obj) const
 {
     return obj
         ? toUTF((jstring) callObjectMethod(obj, _mids[mid_obj_toString]))
         : NULL;
 }
 
-char *JCCEnv::getClassName(jobject obj)
+char *JCCEnv::getClassName(jobject obj) const
 {
     return obj
         ? toString(callObjectMethod(obj, _mids[mid_obj_getClass]))
@@ -651,7 +673,7 @@
 
 #ifdef PYTHON
 
-jstring JCCEnv::fromPyString(PyObject *object)
+jstring JCCEnv::fromPyString(PyObject *object) const
 {
     if (object == Py_None)
         return NULL;
@@ -694,43 +716,48 @@
     }
 }
 
-PyObject *JCCEnv::fromJString(jstring js)
+PyObject *JCCEnv::fromJString(jstring js, int delete_local_ref) const
 {
     if (!js)
         Py_RETURN_NONE;
 
     JNIEnv *vm_env = get_vm_env();
+    PyObject *string;
 
     if (sizeof(Py_UNICODE) == sizeof(jchar))
     {
         jboolean isCopy;
         const jchar *buf = vm_env-&gt;GetStringChars(js, &amp;isCopy);
         jsize len = vm_env-&gt;GetStringLength(js);
-        PyObject *string = PyUnicode_FromUnicode((const Py_UNICODE *) buf, len);
 
+        string = PyUnicode_FromUnicode((const Py_UNICODE *) buf, len);
         vm_env-&gt;ReleaseStringChars(js, buf);
-        return string;
     }
     else
     {
         jsize len = vm_env-&gt;GetStringLength(js);
-        PyObject *string = PyUnicode_FromUnicode(NULL, len);
 
-        if (!string)
-            return NULL;
-
-        jboolean isCopy;
-        const jchar *jchars = vm_env-&gt;GetStringChars(js, &amp;isCopy);
-        Py_UNICODE *pchars = PyUnicode_AS_UNICODE(string);
+        string = PyUnicode_FromUnicode(NULL, len);
+        if (string)
+        {
+            jboolean isCopy;
+            const jchar *jchars = vm_env-&gt;GetStringChars(js, &amp;isCopy);
+            Py_UNICODE *pchars = PyUnicode_AS_UNICODE(string);
 
-        for (int i = 0; i &lt; len; i++)
-            pchars[i] = (Py_UNICODE) jchars[i];
+            for (int i = 0; i &lt; len; i++)
+                pchars[i] = (Py_UNICODE) jchars[i];
         
-        vm_env-&gt;ReleaseStringChars(js, jchars);
-        return string;
+            vm_env-&gt;ReleaseStringChars(js, jchars);
+        }
     }
+
+    if (delete_local_ref)
+        vm_env-&gt;DeleteLocalRef((jobject) js);
+
+    return string;
 }
 
+
 /* may be called from finalizer thread which has no vm_env thread local */
 void JCCEnv::finalizeObject(JNIEnv *jenv, PyObject *obj)
 {

Modified: lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.h?rev=826864&amp;r1=826863&amp;r2=826864&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.h (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/JCCEnv.h Mon Oct 19 23:08:04 2009
@@ -86,6 +86,8 @@
         mid_obj_toString,
         mid_obj_hashCode,
         mid_obj_getClass,
+        mid_iterator_next,
+        mid_enumeration_nextElement,
         max_mid
     };
 
@@ -116,14 +118,14 @@
     virtual ~JCCEnv() {};
 
 #if defined(_MSC_VER) || defined(__WIN32)
-    inline JNIEnv *get_vm_env()
+    inline JNIEnv *get_vm_env() const
     {
         return (JNIEnv *) TlsGetValue(VM_ENV);
     }
 #else
     static pthread_key_t VM_ENV;
 
-    inline JNIEnv *get_vm_env()
+    inline JNIEnv *get_vm_env() const
     {
         return (JNIEnv *) pthread_getspecific(VM_ENV);
     }
@@ -131,11 +133,16 @@
     virtual void set_vm(JavaVM *vm, JNIEnv *vm_env);
     virtual void set_vm_env(JNIEnv *vm_env);
 
-    virtual jint getJNIVersion();
-    virtual jstring getJavaVersion();
+    virtual jint getJNIVersion() const;
+    virtual jstring getJavaVersion() const;
+
+    virtual jclass findClass(const char *className) const;
+    virtual void registerNatives(jclass cls, JNINativeMethod *methods,
+                                 int n) const;
+
+    virtual jobject iteratorNext(jobject obj) const;
+    virtual jobject enumerationNext(jobject obj) const;
 
-    virtual jclass findClass(const char *className);
-    virtual void registerNatives(jclass cls, JNINativeMethod *methods, int n);
     virtual jobject newGlobalRef(jobject obj, int id);
     virtual jobject deleteGlobalRef(jobject obj, int id);
 
@@ -143,85 +150,105 @@
                               int m, ...);
 
     virtual jobjectArray newObjectArray(jclass cls, int size);
-    virtual void setObjectArrayElement(jobjectArray a, int n, jobject obj);
-    virtual jobject getObjectArrayElement(jobjectArray a, int n);
-    virtual int getArrayLength(jarray a);
-
-    virtual jclass getPythonExceptionClass();
-    virtual void reportException();
-
-    virtual jobject callObjectMethod(jobject obj, jmethodID mid, ...);
-    virtual jboolean callBooleanMethod(jobject obj, jmethodID mid, ...);
-    virtual jbyte callByteMethod(jobject obj, jmethodID mid, ...);
-    virtual jchar callCharMethod(jobject obj, jmethodID mid, ...);
-    virtual jdouble callDoubleMethod(jobject obj, jmethodID mid, ...);
-    virtual jfloat callFloatMethod(jobject obj, jmethodID mid, ...);
-    virtual jint callIntMethod(jobject obj, jmethodID mid, ...);
-    virtual jlong callLongMethod(jobject obj, jmethodID mid, ...);
-    virtual jshort callShortMethod(jobject obj, jmethodID mid, ...);
-    virtual void callVoidMethod(jobject obj, jmethodID mid, ...);
-
-    virtual jobject callNonvirtualObjectMethod(jobject obj, jclass cls, jmethodID mid, ...);
-    virtual jboolean callNonvirtualBooleanMethod(jobject obj, jclass cls, jmethodID mid,
...);
-    virtual jbyte callNonvirtualByteMethod(jobject obj, jclass cls, jmethodID mid, ...);
-    virtual jchar callNonvirtualCharMethod(jobject obj, jclass cls, jmethodID mid, ...);
-    virtual jdouble callNonvirtualDoubleMethod(jobject obj, jclass cls, jmethodID mid, ...);
-    virtual jfloat callNonvirtualFloatMethod(jobject obj, jclass cls, jmethodID mid, ...);
-    virtual jint callNonvirtualIntMethod(jobject obj, jclass cls, jmethodID mid, ...);
-    virtual jlong callNonvirtualLongMethod(jobject obj, jclass cls, jmethodID mid, ...);
-    virtual jshort callNonvirtualShortMethod(jobject obj, jclass cls, jmethodID mid, ...);
-    virtual void callNonvirtualVoidMethod(jobject obj, jclass cls, jmethodID mid, ...);
-
-    virtual jobject callStaticObjectMethod(jclass cls, jmethodID mid, ...);
-    virtual jboolean callStaticBooleanMethod(jclass cls, jmethodID mid, ...);
-    virtual jbyte callStaticByteMethod(jclass cls, jmethodID mid, ...);
-    virtual jchar callStaticCharMethod(jclass cls, jmethodID mid, ...);
-    virtual jdouble callStaticDoubleMethod(jclass cls, jmethodID mid, ...);
-    virtual jfloat callStaticFloatMethod(jclass cls, jmethodID mid, ...);
-    virtual jint callStaticIntMethod(jclass cls, jmethodID mid, ...);
-    virtual jlong callStaticLongMethod(jclass cls, jmethodID mid, ...);
-    virtual jshort callStaticShortMethod(jclass cls, jmethodID mid, ...);
-    virtual void callStaticVoidMethod(jclass cls, jmethodID mid, ...);
+    virtual void setObjectArrayElement(jobjectArray a, int n,
+                                       jobject obj) const;
+    virtual jobject getObjectArrayElement(jobjectArray a, int n) const;
+    virtual int getArrayLength(jarray a) const;
+
+    virtual void reportException() const;
+
+    virtual jobject callObjectMethod(jobject obj, jmethodID mid, ...) const;
+    virtual jboolean callBooleanMethod(jobject obj, jmethodID mid, ...) const;
+    virtual jbyte callByteMethod(jobject obj, jmethodID mid, ...) const;
+    virtual jchar callCharMethod(jobject obj, jmethodID mid, ...) const;
+    virtual jdouble callDoubleMethod(jobject obj, jmethodID mid, ...) const;
+    virtual jfloat callFloatMethod(jobject obj, jmethodID mid, ...) const;
+    virtual jint callIntMethod(jobject obj, jmethodID mid, ...) const;
+    virtual jlong callLongMethod(jobject obj, jmethodID mid, ...) const;
+    virtual jshort callShortMethod(jobject obj, jmethodID mid, ...) const;
+    virtual void callVoidMethod(jobject obj, jmethodID mid, ...) const;
+
+    virtual jobject callNonvirtualObjectMethod(jobject obj, jclass cls,
+                                               jmethodID mid, ...) const;
+    virtual jboolean callNonvirtualBooleanMethod(jobject obj, jclass cls,
+                                                 jmethodID mid, ...) const;
+    virtual jbyte callNonvirtualByteMethod(jobject obj, jclass cls,
+                                           jmethodID mid, ...) const;
+    virtual jchar callNonvirtualCharMethod(jobject obj, jclass cls,
+                                           jmethodID mid, ...) const;
+    virtual jdouble callNonvirtualDoubleMethod(jobject obj, jclass cls,
+                                               jmethodID mid, ...) const;
+    virtual jfloat callNonvirtualFloatMethod(jobject obj, jclass cls,
+                                             jmethodID mid, ...) const;
+    virtual jint callNonvirtualIntMethod(jobject obj, jclass cls,
+                                         jmethodID mid, ...) const;
+    virtual jlong callNonvirtualLongMethod(jobject obj, jclass cls,
+                                           jmethodID mid, ...) const;
+    virtual jshort callNonvirtualShortMethod(jobject obj, jclass cls,
+                                             jmethodID mid, ...) const;
+    virtual void callNonvirtualVoidMethod(jobject obj, jclass cls,
+                                          jmethodID mid, ...) const;
+
+    virtual jobject callStaticObjectMethod(jclass cls,
+                                           jmethodID mid, ...) const;
+    virtual jboolean callStaticBooleanMethod(jclass cls,
+                                             jmethodID mid, ...) const;
+    virtual jbyte callStaticByteMethod(jclass cls,
+                                       jmethodID mid, ...) const;
+    virtual jchar callStaticCharMethod(jclass cls,
+                                       jmethodID mid, ...) const;
+    virtual jdouble callStaticDoubleMethod(jclass cls,
+                                           jmethodID mid, ...) const;
+    virtual jfloat callStaticFloatMethod(jclass cls,
+                                         jmethodID mid, ...) const;
+    virtual jint callStaticIntMethod(jclass cls,
+                                     jmethodID mid, ...) const;
+    virtual jlong callStaticLongMethod(jclass cls,
+                                       jmethodID mid, ...) const;
+    virtual jshort callStaticShortMethod(jclass cls,
+                                         jmethodID mid, ...) const;
+    virtual void callStaticVoidMethod(jclass cls,
+                                      jmethodID mid, ...) const;
 
     virtual jmethodID getMethodID(jclass cls, const char *name,
-                                  const char *signature);
+                                  const char *signature) const;
     virtual jfieldID getFieldID(jclass cls, const char *name,
-                                const char *signature);
+                                const char *signature) const;
     virtual jmethodID getStaticMethodID(jclass cls, const char *name,
-                                        const char *signature);
+                                        const char *signature) const;
 
     virtual jobject getStaticObjectField(jclass cls, const char *name,
-                                         const char *signature);
-    virtual jboolean getStaticBooleanField(jclass cls, const char *name);
-    virtual jbyte getStaticByteField(jclass cls, const char *name);
-    virtual jchar getStaticCharField(jclass cls, const char *name);
-    virtual jdouble getStaticDoubleField(jclass cls, const char *name);
-    virtual jfloat getStaticFloatField(jclass cls, const char *name);
-    virtual jint getStaticIntField(jclass cls, const char *name);
-    virtual jlong getStaticLongField(jclass cls, const char *name);
-    virtual jshort getStaticShortField(jclass cls, const char *name);
-
-    virtual jobject getObjectField(jobject obj, jfieldID id);
-    virtual jboolean getBooleanField(jobject obj, jfieldID id);
-    virtual jbyte getByteField(jobject obj, jfieldID id);
-    virtual jchar getCharField(jobject obj, jfieldID id);
-    virtual jdouble getDoubleField(jobject obj, jfieldID id);
-    virtual jfloat getFloatField(jobject obj, jfieldID id);
-    virtual jint getIntField(jobject obj, jfieldID id);
-    virtual jlong getLongField(jobject obj, jfieldID id);
-    virtual jshort getShortField(jobject obj, jfieldID id);
-
-    virtual void setObjectField(jobject obj, jfieldID id, jobject value);
-    virtual void setBooleanField(jobject obj, jfieldID id, jboolean value);
-    virtual void setByteField(jobject obj, jfieldID id, jbyte value);
-    virtual void setCharField(jobject obj, jfieldID id, jchar value);
-    virtual void setDoubleField(jobject obj, jfieldID id, jdouble value);
-    virtual void setFloatField(jobject obj, jfieldID id, jfloat value);
-    virtual void setIntField(jobject obj, jfieldID id, jint value);
-    virtual void setLongField(jobject obj, jfieldID id, jlong value);
-    virtual void setShortField(jobject obj, jfieldID id, jshort value);
+                                         const char *signature) const;
+    virtual jboolean getStaticBooleanField(jclass cls, const char *name) const;
+    virtual jbyte getStaticByteField(jclass cls, const char *name) const;
+    virtual jchar getStaticCharField(jclass cls, const char *name) const;
+    virtual jdouble getStaticDoubleField(jclass cls, const char *name) const;
+    virtual jfloat getStaticFloatField(jclass cls, const char *name) const;
+    virtual jint getStaticIntField(jclass cls, const char *name) const;
+    virtual jlong getStaticLongField(jclass cls, const char *name) const;
+    virtual jshort getStaticShortField(jclass cls, const char *name) const;
+
+    virtual jobject getObjectField(jobject obj, jfieldID id) const;
+    virtual jboolean getBooleanField(jobject obj, jfieldID id) const;
+    virtual jbyte getByteField(jobject obj, jfieldID id) const;
+    virtual jchar getCharField(jobject obj, jfieldID id) const;
+    virtual jdouble getDoubleField(jobject obj, jfieldID id) const;
+    virtual jfloat getFloatField(jobject obj, jfieldID id) const;
+    virtual jint getIntField(jobject obj, jfieldID id) const;
+    virtual jlong getLongField(jobject obj, jfieldID id) const;
+    virtual jshort getShortField(jobject obj, jfieldID id) const;
+
+    virtual void setObjectField(jobject obj, jfieldID id, jobject value) const;
+    virtual void setBooleanField(jobject obj, jfieldID id, jboolean value) const;
+    virtual void setByteField(jobject obj, jfieldID id, jbyte value) const;
+    virtual void setCharField(jobject obj, jfieldID id, jchar value) const;
+    virtual void setDoubleField(jobject obj, jfieldID id, jdouble value) const;
+    virtual void setFloatField(jobject obj, jfieldID id, jfloat value) const;
+    virtual void setIntField(jobject obj, jfieldID id, jint value) const;
+    virtual void setLongField(jobject obj, jfieldID id, jlong value) const;
+    virtual void setShortField(jobject obj, jfieldID id, jshort value) const;
 
-    int id(jobject obj) {
+    int id(jobject obj) const {
         return obj
             ? get_vm_env()-&gt;CallStaticIntMethod(_sys,
                                                 _mids[mid_sys_identityHashCode],
@@ -229,24 +256,26 @@
             : 0;
     }
 
-    int hash(jobject obj) {
+    int hash(jobject obj) const {
         return obj
             ? get_vm_env()-&gt;CallIntMethod(obj, _mids[mid_obj_hashCode])
             : 0;
     }
 
     virtual void setClassPath(const char *classPath);
-    virtual jstring fromUTF(const char *bytes);
-    virtual char *toUTF(jstring str);
-    virtual char *toString(jobject obj);
-    virtual char *getClassName(jobject obj);
+
+    virtual jstring fromUTF(const char *bytes) const;
+    virtual char *toUTF(jstring str) const;
+    virtual char *toString(jobject obj) const;
+    virtual char *getClassName(jobject obj) const;
 #ifdef PYTHON
-    virtual jstring fromPyString(PyObject *object);
-    virtual PyObject *fromJString(jstring js);
+    virtual jclass getPythonExceptionClass() const;
+    virtual jstring fromPyString(PyObject *object) const;
+    virtual PyObject *fromJString(jstring js, int delete_local_ref) const;
     virtual void finalizeObject(JNIEnv *jenv, PyObject *obj);
 #endif
 
-    virtual inline int isSame(jobject o1, jobject o2)
+    virtual inline int isSame(jobject o1, jobject o2) const
     {
         return o1 == o2 || get_vm_env()-&gt;IsSameObject(o1, o2);
     }

Modified: lucene/pylucene/trunk/jcc/jcc/sources/JObject.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/JObject.h?rev=826864&amp;r1=826863&amp;r2=826864&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/JObject.h (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/JObject.h Mon Oct 19 23:08:04 2009
@@ -27,8 +27,16 @@
 
     inline explicit JObject(jobject obj)
     {
-        id = env-&gt;id(obj);
-        this$ = env-&gt;newGlobalRef(obj, id);
+        if (obj)
+        {
+            id = env-&gt;id(obj);
+            this$ = env-&gt;newGlobalRef(obj, id);
+        }
+        else
+        {
+            id = 0;
+            this$ = NULL;
+        }
     }
 
     inline JObject(const JObject&amp; obj)

Modified: lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp?rev=826864&amp;r1=826863&amp;r2=826864&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp Mon Oct 19 23:08:04 2009
@@ -903,7 +903,7 @@
 
 PyObject *j2p(const String&amp; js)
 {
-    return env-&gt;fromJString((jstring) js.this$);
+    return env-&gt;fromJString((jstring) js.this$, 0);
 }
 
 PyObject *PyErr_SetArgsError(char *name, PyObject *args)

Modified: lucene/pylucene/trunk/jcc/jcc/sources/functions.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/functions.h?rev=826864&amp;r1=826863&amp;r2=826864&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/functions.h (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/functions.h Mon Oct 19 23:08:04 2009
@@ -69,6 +69,7 @@
 #endif
 
 int abstract_init(PyObject *self, PyObject *args, PyObject *kwds);
+PyObject *wrapType(PyTypeObject *type, const jobject&amp; obj);
 
 PyObject *j2p(const java::lang::String&amp; js);
 java::lang::String p2j(PyObject *object);
@@ -113,10 +114,9 @@
 }
 #endif
 
-template&lt;class T, class U, class V&gt; PyObject *get_iterator_next(T *self)
+template&lt;class T, class U&gt; PyObject *get_iterator_next(T *self)
 {
     jboolean hasNext;
-
     OBJ_CALL(hasNext = self-&gt;object.hasNext());
     if (!hasNext)
     {
@@ -124,21 +124,20 @@
         return NULL;
     }
 
-    V next((jobject) NULL);
-    OBJ_CALL(next = self-&gt;object.next());
+    jobject next;
+    OBJ_CALL(next = env-&gt;iteratorNext(self-&gt;object.this$));
 
     jclass cls = java::lang::String::initializeClass();
-    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
-        return env-&gt;fromJString((jstring) next.this$);
+    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next, cls))
+        return env-&gt;fromJString((jstring) next, 1);
 
-    return U::wrap_Object(next);
+    return U::wrap_jobject(next);
 }
 
 #ifdef _java_generics
-template&lt;class T, class U, class V&gt; PyObject *get_generic_iterator_next(T *self)
+template&lt;class T, class U&gt; PyObject *get_generic_iterator_next(T *self)
 {
     jboolean hasNext;
-
     OBJ_CALL(hasNext = self-&gt;object.hasNext());
     if (!hasNext)
     {
@@ -146,26 +145,24 @@
         return NULL;
     }
 
-    V next((jobject) NULL);
-    OBJ_CALL(next = self-&gt;object.next());
+    jobject next;
+    OBJ_CALL(next = env-&gt;iteratorNext(self-&gt;object.this$));
 
     jclass cls = java::lang::String::initializeClass();
-    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
-        return env-&gt;fromJString((jstring) next.this$);
+    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next, cls))
+        return env-&gt;fromJString((jstring) next, 1);
 
     PyTypeObject *param = self-&gt;parameters ? self-&gt;parameters[0] : NULL;
-
     if (param != NULL)
-        return wrapType(param, next.this$);
+        return wrapType(param, next);
 
-    return U::wrap_Object(next);
+    return U::wrap_jobject(next);
 }
 #endif
 
-template&lt;class T, class U, class V&gt; PyObject *get_enumeration_next(T *self)
+template&lt;class T, class U&gt; PyObject *get_enumeration_next(T *self)
 {
     jboolean hasMoreElements;
-
     OBJ_CALL(hasMoreElements = self-&gt;object.hasMoreElements());
     if (!hasMoreElements)
     {
@@ -173,21 +170,20 @@
         return NULL;
     }
 
-    V next((jobject) NULL);
-    OBJ_CALL(next = self-&gt;object.nextElement());
+    jobject next;
+    OBJ_CALL(next = env-&gt;enumerationNext(self-&gt;object.this$));
 
     jclass cls = java::lang::String::initializeClass();
-    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
-        return env-&gt;fromJString((jstring) next.this$);
+    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next, cls))
+        return env-&gt;fromJString((jstring) next, 1);
 
-    return U::wrap_Object(next);
+    return U::wrap_jobject(next);
 }
 
 #ifdef _java_generics
-template&lt;class T, class U, class V&gt; PyObject *get_generic_enumeration_next(T *self)
+template&lt;class T, class U&gt; PyObject *get_generic_enumeration_next(T *self)
 {
     jboolean hasMoreElements;
-
     OBJ_CALL(hasMoreElements = self-&gt;object.hasMoreElements());
     if (!hasMoreElements)
     {
@@ -195,26 +191,24 @@
         return NULL;
     }
 
-    V next((jobject) NULL);
-    OBJ_CALL(next = self-&gt;object.nextElement());
+    jobject next;
+    OBJ_CALL(next = env-&gt;enumerationNext(self-&gt;object.this$));
 
     jclass cls = java::lang::String::initializeClass();
-    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
-        return env-&gt;fromJString((jstring) next.this$);
+    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next, cls))
+        return env-&gt;fromJString((jstring) next, 1);
 
     PyTypeObject *param = self-&gt;parameters ? self-&gt;parameters[0] : NULL;
-
     if (param != NULL)
-        return wrapType(param, next.this$);
+        return wrapType(param, next);
 
-    return U::wrap_Object(next);
+    return U::wrap_jobject(next);
 }
 #endif
 
 template&lt;class T, class U, class V&gt; PyObject *get_next(T *self)
 {
     V next((jobject) NULL);
-
     OBJ_CALL(next = self-&gt;object.next());
     if (!next)
     {
@@ -224,7 +218,7 @@
         
     jclass cls = java::lang::String::initializeClass();
     if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
-        return env-&gt;fromJString((jstring) next.this$);
+        return env-&gt;fromJString((jstring) next.this$, 0);
 
     return U::wrap_Object(next);
 }
@@ -233,7 +227,6 @@
 template&lt;class T, class U, class V&gt; PyObject *get_generic_next(T *self)
 {
     V next((jobject) NULL);
-
     OBJ_CALL(next = self-&gt;object.next());
     if (!next)
     {
@@ -243,10 +236,9 @@
         
     jclass cls = java::lang::String::initializeClass();
     if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
-        return env-&gt;fromJString((jstring) next.this$);
+        return env-&gt;fromJString((jstring) next.this$, 0);
 
     PyTypeObject *param = self-&gt;parameters ? self-&gt;parameters[0] : NULL;
-
     if (param != NULL)
         return wrapType(param, next.this$);
 
@@ -263,7 +255,6 @@
                     int reportError);
 void installType(PyTypeObject *type, PyObject *module, char *name,
                  int isExtension);
-PyObject *wrapType(PyTypeObject *type, const jobject&amp; obj);
 
 #ifdef _java_generics
 PyObject *typeParameters(PyTypeObject *types[], size_t size);

Modified: lucene/pylucene/trunk/jcc/jcc/sources/jcc.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/jcc.cpp?rev=826864&amp;r1=826863&amp;r2=826864&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/jcc.cpp (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/jcc.cpp Mon Oct 19 23:08:04 2009
@@ -275,7 +275,7 @@
 
 static PyObject *t_jccenv__get_java_version(PyObject *self, void *data)
 {
-    return env-&gt;fromJString(env-&gt;getJavaVersion());
+    return env-&gt;fromJString(env-&gt;getJavaVersion(), 1);
 }
 
 _DLL_EXPORT PyObject *getVMEnv(PyObject *self)




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r826079 - in /lucene/pylucene/branches/pylucene_2_9/jcc: ./ CHANGES jcc/sources/JArray.h jcc/sources/functions.cpp</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091016204057.06ECB23888E7@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091016204057-06ECB23888E7@eris-apache-org%3e</id>
<updated>2009-10-16T20:40:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Fri Oct 16 20:40:56 2009
New Revision: 826079

URL: http://svn.apache.org/viewvc?rev=826079&amp;view=rev
Log:
fixed bug with passing list of extension objects

Modified:
    lucene/pylucene/branches/pylucene_2_9/jcc/   (props changed)
    lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES
    lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/JArray.h
    lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.cpp

Propchange: lucene/pylucene/branches/pylucene_2_9/jcc/
------------------------------------------------------------------------------
    svn:mergeinfo = /lucene/pylucene/trunk/jcc:826057

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES?rev=826079&amp;r1=826078&amp;r2=826079&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/CHANGES Fri Oct 16 20:40:56 2009
@@ -12,6 +12,7 @@
  - added --arch command line flag to filter Mac OS X python config settings
  - cast_() and instance_() methods now generated on extension classes as well
  - fixed bug with reporting Python error that occurred in an extension class
+ - fixed bug with passing list of extension objects
 
 Version 2.2 -&gt; 2.3
 ------------------

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/JArray.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/JArray.h?rev=826079&amp;r1=826078&amp;r2=826079&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/JArray.h (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/JArray.h Fri Oct 16 20:40:56 2009
@@ -112,30 +112,8 @@
     }
 
 #ifdef PYTHON
-    JArray&lt;jobject&gt;(jclass cls, PyObject *sequence) : java::lang::Object(env-&gt;get_vm_env()-&gt;NewObjectArray(PySequence_Length(sequence),
cls, NULL)) {
-        length = env-&gt;getArrayLength((jobjectArray) this$);
-
-        for (int i = 0; i &lt; length; i++) {
-            PyObject *obj = PySequence_GetItem(sequence, i);
-
-            if (obj == NULL)
-                break;
-
-            if (!PyObject_TypeCheck(obj, &amp;JObject$$Type))
-            {
-                PyErr_SetObject(PyExc_TypeError, obj);
-                break;
-            }
-
-            jobject jobj = ((t_JObject *) obj)-&gt;object.this$;
-
-            Py_DECREF(obj);
-            try {
-                env-&gt;setObjectArrayElement((jobjectArray) this$, i, jobj);
-            } catch (JCCEnv::exception e) {
-                PyErr_SetJavaError(e.throwable);
-            }
-        }
+    JArray&lt;jobject&gt;(jclass cls, PyObject *sequence) : java::lang::Object(fromPySequence(cls,
sequence)) {
+        length = this$ ? env-&gt;getArrayLength((jobjectArray) this$) : 0;
     }
 
     PyObject *toSequence(PyObject *(*wrapfn)(const jobject&amp;))

Modified: lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.cpp?rev=826079&amp;r1=826078&amp;r2=826079&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.cpp (original)
+++ lucene/pylucene/branches/pylucene_2_9/jcc/jcc/sources/functions.cpp Fri Oct 16 20:40:56
2009
@@ -182,10 +182,21 @@
                       if (PySequence_Length(arg) &gt; 0)
                       {
                           PyObject *obj = PySequence_GetItem(arg, 0);
-                          int ok =
-                              (obj == Py_None ||
-                               (PyObject_TypeCheck(obj, &amp;Object$$Type) &amp;&amp;
-                                vm_env-&gt;IsInstanceOf(((t_Object *) obj)-&gt;object.this$,
cls)));
+                          int ok = 0;
+
+                          if (obj == Py_None)
+                              ok = 1;
+                          else if (PyObject_TypeCheck(obj, &amp;Object$$Type) &amp;&amp;
+                                   vm_env-&gt;IsInstanceOf(((t_Object *) obj)-&gt;object.this$,
cls))
+                              ok = 1;
+                          else if (PyObject_TypeCheck(obj, &amp;FinalizerProxy$$Type))
+                          {
+                              PyObject *o = ((t_fp *) obj)-&gt;object;
+
+                              if (PyObject_TypeCheck(o, &amp;Object$$Type) &amp;&amp;
+                                  vm_env-&gt;IsInstanceOf(((t_Object *) o)-&gt;object.this$,
cls))
+                                  ok = 1;
+                          }
 
                           Py_DECREF(obj);
                           if (ok)




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r826068 - in /lucene/pylucene/branches/pylucene_2_4/jcc: ./ CHANGES jcc/sources/JArray.h jcc/sources/functions.cpp</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091016201822.C62C123888BD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091016201822-C62C123888BD@eris-apache-org%3e</id>
<updated>2009-10-16T20:18:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Fri Oct 16 20:18:22 2009
New Revision: 826068

URL: http://svn.apache.org/viewvc?rev=826068&amp;view=rev
Log:
fixed bug with passing list of extension objects

Modified:
    lucene/pylucene/branches/pylucene_2_4/jcc/   (props changed)
    lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES
    lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/JArray.h
    lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp

Propchange: lucene/pylucene/branches/pylucene_2_4/jcc/
------------------------------------------------------------------------------
    svn:mergeinfo = /lucene/pylucene/trunk/jcc:826057

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES?rev=826068&amp;r1=826067&amp;r2=826068&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/CHANGES Fri Oct 16 20:18:22 2009
@@ -9,6 +9,7 @@
  - added support for --rename to workaround python flattened namespace clashes
  - fixed bug with Enumeration/Iterator template function instantiation
  - removed -framework Python from darwin link flags in setup.py
+ - fixed bug with passing list of extension objects
 
 Version 2.1 -&gt; 2.2
 ------------------

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/JArray.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/JArray.h?rev=826068&amp;r1=826067&amp;r2=826068&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/JArray.h (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/JArray.h Fri Oct 16 20:18:22 2009
@@ -112,30 +112,8 @@
     }
 
 #ifdef PYTHON
-    JArray&lt;jobject&gt;(jclass cls, PyObject *sequence) : java::lang::Object(env-&gt;get_vm_env()-&gt;NewObjectArray(PySequence_Length(sequence),
cls, NULL)) {
-        length = env-&gt;getArrayLength((jobjectArray) this$);
-
-        for (int i = 0; i &lt; length; i++) {
-            PyObject *obj = PySequence_GetItem(sequence, i);
-
-            if (obj == NULL)
-                break;
-
-            if (!PyObject_TypeCheck(obj, &amp;JObject$$Type))
-            {
-                PyErr_SetObject(PyExc_TypeError, obj);
-                break;
-            }
-
-            jobject jobj = ((t_JObject *) obj)-&gt;object.this$;
-
-            Py_DECREF(obj);
-            try {
-                env-&gt;setObjectArrayElement((jobjectArray) this$, i, jobj);
-            } catch (JCCEnv::exception e) {
-                PyErr_SetJavaError(e.throwable);
-            }
-        }
+    JArray&lt;jobject&gt;(jclass cls, PyObject *sequence) : java::lang::Object(fromPySequence(cls,
sequence)) {
+        length = this$ ? env-&gt;getArrayLength((jobjectArray) this$) : 0;
     }
 
     PyObject *toSequence(PyObject *(*wrapfn)(const jobject&amp;))

Modified: lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp?rev=826068&amp;r1=826067&amp;r2=826068&amp;view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp (original)
+++ lucene/pylucene/branches/pylucene_2_4/jcc/jcc/sources/functions.cpp Fri Oct 16 20:18:22
2009
@@ -182,10 +182,21 @@
                       if (PySequence_Length(arg) &gt; 0)
                       {
                           PyObject *obj = PySequence_GetItem(arg, 0);
-                          int ok =
-                              (obj == Py_None ||
-                               (PyObject_TypeCheck(obj, &amp;Object$$Type) &amp;&amp;
-                                vm_env-&gt;IsInstanceOf(((t_Object *) obj)-&gt;object.this$,
cls)));
+                          int ok = 0;
+
+                          if (obj == Py_None)
+                              ok = 1;
+                          else if (PyObject_TypeCheck(obj, &amp;Object$$Type) &amp;&amp;
+                                   vm_env-&gt;IsInstanceOf(((t_Object *) obj)-&gt;object.this$,
cls))
+                              ok = 1;
+                          else if (PyObject_TypeCheck(obj, &amp;FinalizerProxy$$Type))
+                          {
+                              PyObject *o = ((t_fp *) obj)-&gt;object;
+
+                              if (PyObject_TypeCheck(o, &amp;Object$$Type) &amp;&amp;
+                                  vm_env-&gt;IsInstanceOf(((t_Object *) o)-&gt;object.this$,
cls))
+                                  ok = 1;
+                          }
 
                           Py_DECREF(obj);
                           if (ok)




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r826057 - in /lucene/pylucene/trunk/jcc: CHANGES jcc/sources/JArray.h jcc/sources/functions.cpp</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091016195822.093F423888FC@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091016195822-093F423888FC@eris-apache-org%3e</id>
<updated>2009-10-16T19:58:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Fri Oct 16 19:58:21 2009
New Revision: 826057

URL: http://svn.apache.org/viewvc?rev=826057&amp;view=rev
Log:
fixed bug with passing list of extension objects

Modified:
    lucene/pylucene/trunk/jcc/CHANGES
    lucene/pylucene/trunk/jcc/jcc/sources/JArray.h
    lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp

Modified: lucene/pylucene/trunk/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/CHANGES?rev=826057&amp;r1=826056&amp;r2=826057&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/CHANGES (original)
+++ lucene/pylucene/trunk/jcc/CHANGES Fri Oct 16 19:58:21 2009
@@ -6,6 +6,7 @@
  - default value to initVM's classpath parameter now is importing module's
  - added (partial) support for Java generics
  - added 'string_' property to JArray('byte') instances to extract byte string
+ - fixed bug with passing list of extension objects
  - 
 
 Version 2.3 -&gt; 2.4

Modified: lucene/pylucene/trunk/jcc/jcc/sources/JArray.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/JArray.h?rev=826057&amp;r1=826056&amp;r2=826057&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/JArray.h (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/JArray.h Fri Oct 16 19:58:21 2009
@@ -112,30 +112,8 @@
     }
 
 #ifdef PYTHON
-    JArray&lt;jobject&gt;(jclass cls, PyObject *sequence) : java::lang::Object(env-&gt;get_vm_env()-&gt;NewObjectArray(PySequence_Length(sequence),
cls, NULL)) {
-        length = env-&gt;getArrayLength((jobjectArray) this$);
-
-        for (int i = 0; i &lt; length; i++) {
-            PyObject *obj = PySequence_GetItem(sequence, i);
-
-            if (obj == NULL)
-                break;
-
-            if (!PyObject_TypeCheck(obj, &amp;JObject$$Type))
-            {
-                PyErr_SetObject(PyExc_TypeError, obj);
-                break;
-            }
-
-            jobject jobj = ((t_JObject *) obj)-&gt;object.this$;
-
-            Py_DECREF(obj);
-            try {
-                env-&gt;setObjectArrayElement((jobjectArray) this$, i, jobj);
-            } catch (JCCEnv::exception e) {
-                PyErr_SetJavaError(e.throwable);
-            }
-        }
+    JArray&lt;jobject&gt;(jclass cls, PyObject *sequence) : java::lang::Object(fromPySequence(cls,
sequence)) {
+        length = this$ ? env-&gt;getArrayLength((jobjectArray) this$) : 0;
     }
 
     PyObject *toSequence(PyObject *(*wrapfn)(const jobject&amp;))

Modified: lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp?rev=826057&amp;r1=826056&amp;r2=826057&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/functions.cpp Fri Oct 16 19:58:21 2009
@@ -206,10 +206,21 @@
                       if (PySequence_Length(arg) &gt; 0)
                       {
                           PyObject *obj = PySequence_GetItem(arg, 0);
-                          int ok =
-                              (obj == Py_None ||
-                               (PyObject_TypeCheck(obj, &amp;Object$$Type) &amp;&amp;
-                                vm_env-&gt;IsInstanceOf(((t_Object *) obj)-&gt;object.this$,
cls)));
+                          int ok = 0;
+
+                          if (obj == Py_None)
+                              ok = 1;
+                          else if (PyObject_TypeCheck(obj, &amp;Object$$Type) &amp;&amp;
+                                   vm_env-&gt;IsInstanceOf(((t_Object *) obj)-&gt;object.this$,
cls))
+                              ok = 1;
+                          else if (PyObject_TypeCheck(obj, &amp;FinalizerProxy$$Type))
+                          {
+                              PyObject *o = ((t_fp *) obj)-&gt;object;
+
+                              if (PyObject_TypeCheck(o, &amp;Object$$Type) &amp;&amp;
+                                  vm_env-&gt;IsInstanceOf(((t_Object *) o)-&gt;object.this$,
cls))
+                                  ok = 1;
+                          }
 
                           Py_DECREF(obj);
                           if (ok)




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825722 - in /lucene/pylucene/trunk: jcc/_jcc/java/lang/ jcc/_jcc/java/util/ jcc/jcc/ jcc/jcc/sources/ samples/ test/</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091016010054.25CE623888E5@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091016010054-25CE623888E5@eris-apache-org%3e</id>
<updated>2009-10-16T01:00:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Fri Oct 16 01:00:52 2009
New Revision: 825722

URL: http://svn.apache.org/viewvc?rev=825722&amp;view=rev
Log:
   - added support for generics in Iterator and Enumeration instance iterators
   - samples upgraded to Lucene 3.0.0 APIs

Modified:
    lucene/pylucene/trunk/jcc/_jcc/java/lang/Class.cpp
    lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.cpp
    lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.h
    lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.cpp
    lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.h
    lucene/pylucene/trunk/jcc/jcc/python.py
    lucene/pylucene/trunk/jcc/jcc/sources/functions.h
    lucene/pylucene/trunk/samples/IndexFiles.py
    lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py
    lucene/pylucene/trunk/samples/SearchFiles.py
    lucene/pylucene/trunk/samples/TermPositionVector.py
    lucene/pylucene/trunk/samples/ThreadIndexFiles.py
    lucene/pylucene/trunk/samples/manindex.py
    lucene/pylucene/trunk/samples/mansearch.py
    lucene/pylucene/trunk/test/test_PythonDirectory.py

Modified: lucene/pylucene/trunk/jcc/_jcc/java/lang/Class.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/_jcc/java/lang/Class.cpp?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/_jcc/java/lang/Class.cpp (original)
+++ lucene/pylucene/trunk/jcc/_jcc/java/lang/Class.cpp Fri Oct 16 01:00:52 2009
@@ -346,6 +346,7 @@
         DECLARE_TYPE(Class, t_Class, Object, java::lang::Class,
                      abstract_init, 0, 0, t_Class__fields_, 0, 0);
 
+#ifdef _java_generics
         PyObject *t_Class::wrap_Object(const Class&amp; object, PyTypeObject *T)
         {
             PyObject *obj = t_Class::wrap_Object(object);
@@ -356,7 +357,7 @@
             }
             return obj;
         }
-
+#endif
         static PyObject *t_Class_cast_(PyTypeObject *type, PyObject *arg)
         {
             if (!(arg = castCheck(arg, Class::initializeClass, 1)))

Modified: lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.cpp?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.cpp (original)
+++ lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.cpp Fri Oct 16 01:00:52 2009
@@ -78,6 +78,19 @@
         DECLARE_TYPE(Enumeration, t_Enumeration, JObject,
                      java::util::Enumeration, abstract_init, 0, 0, 0, 0, 0);
 
+#ifdef _java_generics
+        PyObject *t_Enumeration::wrap_Object(const Enumeration&amp; object,
+                                             PyTypeObject *T)
+        {
+            PyObject *obj = t_Enumeration::wrap_Object(object);
+            if (obj != Py_None)
+            {
+                t_Enumeration *self = (t_Enumeration *) obj;
+                self-&gt;parameters[0] = T;
+            }
+            return obj;
+        }
+#endif
         static PyObject *t_Enumeration_hasMoreElements(t_Enumeration *self)
         {
             jboolean b;

Modified: lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.h?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.h (original)
+++ lucene/pylucene/trunk/jcc/_jcc/java/util/Enumeration.h Fri Oct 16 01:00:52 2009
@@ -46,7 +46,18 @@
         public:
             PyObject_HEAD
             Enumeration object;
+#ifdef _java_generics
+            PyTypeObject *parameters[1];
+            static PyTypeObject **parameters_(t_Enumeration *self)
+            {
+                return (PyTypeObject **) &amp;(self-&gt;parameters);
+            }
+#endif
             static PyObject *wrap_Object(const Enumeration&amp; object);
+#ifdef _java_generics
+            static PyObject *wrap_Object(const Enumeration&amp; object,
+                                         PyTypeObject *T);
+#endif
             static PyObject *wrap_jobject(const jobject&amp; object);
         };
     }

Modified: lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.cpp?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.cpp (original)
+++ lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.cpp Fri Oct 16 01:00:52 2009
@@ -80,6 +80,19 @@
         DECLARE_TYPE(Iterator, t_Iterator, JObject, java::util::Iterator,
                      abstract_init, 0, 0, 0, 0, 0);
 
+#ifdef _java_generics
+        PyObject *t_Iterator::wrap_Object(const Iterator&amp; object,
+                                          PyTypeObject *T)
+        {
+            PyObject *obj = t_Iterator::wrap_Object(object);
+            if (obj != Py_None)
+            {
+                t_Iterator *self = (t_Iterator *) obj;
+                self-&gt;parameters[0] = T;
+            }
+            return obj;
+        }
+#endif
         static PyObject *t_Iterator_hasNext(t_Iterator *self)
         {
             jboolean b;

Modified: lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.h?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.h (original)
+++ lucene/pylucene/trunk/jcc/_jcc/java/util/Iterator.h Fri Oct 16 01:00:52 2009
@@ -46,7 +46,18 @@
         public:
             PyObject_HEAD
             Iterator object;
+#ifdef _java_generics
+            PyTypeObject *parameters[1];
+            static PyTypeObject **parameters_(t_Iterator *self)
+            {
+                return (PyTypeObject **) &amp;(self-&gt;parameters);
+            }
+#endif
             static PyObject *wrap_Object(const Iterator&amp; object);
+#ifdef _java_generics
+            static PyObject *wrap_Object(const Iterator&amp; object,
+                                         PyTypeObject *T);
+#endif
             static PyObject *wrap_jobject(const jobject&amp; object);
         };
     }

Modified: lucene/pylucene/trunk/jcc/jcc/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/python.py?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/python.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/python.py Fri Oct 16 01:00:52 2009
@@ -84,8 +84,8 @@
             while cls.isArray():
                 cls = cls.getComponentType()
             if cls.getTypeParameters():
-                p0, sep, p1 = rpartition(typename(cls, current, False), '::')
-                return ', &amp;a%d, &amp;p%d, %s%st_%s::parameters_' %(i, i, p0, sep, p1)
+                ns, sep, n = rpartition(typename(cls, current, False), '::')
+                return ', &amp;a%d, &amp;p%d, %s%st_%s::parameters_' %(i, i, ns, sep, n)
         return ', &amp;a%d' %(i)
 
     return (''.join([signature(param) for param in params]),
@@ -198,10 +198,10 @@
         elif returnType.getName() == 'java.lang.String':
             return 'return JArray&lt;jstring&gt;(%s.this$).wrap();' %(value)
 
-        p0, sep, p1 = rpartition(typename(returnType, cls, False), '::')
-        return 'return JArray&lt;jobject&gt;(%s.this$).wrap(%s%st_%s::wrap_jobject);' %(value,
p0, sep, p1)
+        ns, sep, n = rpartition(typename(returnType, cls, False), '::')
+        return 'return JArray&lt;jobject&gt;(%s.this$).wrap(%s%st_%s::wrap_jobject);' %(value,
ns, sep, n)
 
-    p0, sep, p1 = rpartition(typename(returnType, cls, False), '::')
+    ns, sep, n = rpartition(typename(returnType, cls, False), '::')
     if genericRT is not None:
         if ParameterizedType.instance_(genericRT):
             genericRT = ParameterizedType.cast_(genericRT)
@@ -227,22 +227,22 @@
                 else:
                     break
             else:
-                return 'return %s%st_%s::wrap_Object(%s, %s);' %(p0, sep, p1, value, ', '.join(clsArgs))
+                return 'return %s%st_%s::wrap_Object(%s, %s);' %(ns, sep, n, value, ', '.join(clsArgs))
         elif TypeVariable.instance_(genericRT):
             gd = TypeVariable.cast_(genericRT).getGenericDeclaration()
             i = 0
             if Class.instance_(gd):
                 for clsParam in gd.getTypeParameters():
                     if genericRT == clsParam:
-                        return 'return self-&gt;parameters[%d] != NULL ? wrapType(self-&gt;parameters[%d],
%s.this$) : %s%st_%s::wrap_Object(%s);' %(i, i, value, p0, sep, p1, value)
+                        return 'return self-&gt;parameters[%d] != NULL ? wrapType(self-&gt;parameters[%d],
%s.this$) : %s%st_%s::wrap_Object(%s);' %(i, i, value, ns, sep, n, value)
                     i += 1
             elif Method.instance_(gd):
                 for clsParam in gd.getTypeParameters():
                     if genericRT == clsParam:
-                        return 'return p%d != NULL &amp;&amp; p%d[0] != NULL ? wrapType(p%d[0],
%s.this$) : %s%st_%s::wrap_Object(%s);' %(i, i, i, value, p0, sep, p1, value)
+                        return 'return p%d != NULL &amp;&amp; p%d[0] != NULL ? wrapType(p%d[0],
%s.this$) : %s%st_%s::wrap_Object(%s);' %(i, i, i, value, ns, sep, n, value)
                     i += 1
 
-    return 'return %s%st_%s::wrap_Object(%s);' %(p0, sep, p1, value)
+    return 'return %s%st_%s::wrap_Object(%s);' %(ns, sep, n, value)
 
 
 def call(out, indent, cls, inCase, method, names, cardinality, isExtension,
@@ -797,6 +797,8 @@
     if iteratorMethod:
         if iteratorExt:
             tp_iter = 'get_extension_iterator'
+        elif generics and clsParams:
+            tp_iter = '((PyObject *(*)(t_%s *)) get_generic_iterator&lt;t_%s&gt;)' %(names[-1],
names[-1])
         else:
             tp_iter = '((PyObject *(*)(t_%s *)) get_iterator&lt;t_%s&gt;)' %(names[-1], names[-1])
         tp_iternext = '0'
@@ -806,6 +808,8 @@
         ns, sep, n = rpartition(returnName, '::')
         if nextExt:
             tp_iternext = 'get_extension_next'
+        elif generics and clsParams:
+            tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_generic_iterator_next&lt;java::util::t_Iterator,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
         else:
             tp_iternext = '((PyObject *(*)(java::util::t_Iterator *)) get_iterator_next&lt;java::util::t_Iterator,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
     elif nextElementMethod and enumeration.isAssignableFrom(cls):
@@ -814,6 +818,8 @@
         ns, sep, n = rpartition(returnName, '::')
         if nextElementExt:
             tp_iternext = 'get_extension_nextElement'
+        elif generics and clsParams:
+            tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_generic_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
         else:
             tp_iternext = '((PyObject *(*)(java::util::t_Enumeration *)) get_enumeration_next&lt;java::util::t_Enumeration,%s%st_%s,%s&gt;)'
%(ns, sep, n, returnName)
     elif nextMethod:
@@ -822,6 +828,8 @@
         ns, sep, n = rpartition(returnName, '::')
         if nextExt:
             tp_iternext = 'get_extension_next'
+        elif generics and clsParams:
+            tp_iternext = '((PyObject *(*)(t_%s *)) get_generic_next&lt;t_%s,%s%st_%s,%s&gt;)'
%(names[-1], names[-1], ns, sep, n, returnName)
         else:
             tp_iternext = '((PyObject *(*)(t_%s *)) get_next&lt;t_%s,%s%st_%s,%s&gt;)' %(names[-1],
names[-1], ns, sep, n, returnName)
     else:

Modified: lucene/pylucene/trunk/jcc/jcc/sources/functions.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/functions.h?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/functions.h (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/functions.h Fri Oct 16 01:00:52 2009
@@ -102,6 +102,17 @@
     return java::util::t_Iterator::wrap_Object(iterator);
 }
 
+#ifdef _java_generics
+template&lt;class T&gt; PyObject *get_generic_iterator(T *self)
+{
+    java::util::Iterator iterator((jobject) NULL);
+    PyTypeObject *param = self-&gt;parameters ? self-&gt;parameters[0] : NULL;
+
+    OBJ_CALL(iterator = self-&gt;object.iterator());
+    return java::util::t_Iterator::wrap_Object(iterator, param);
+}
+#endif
+
 template&lt;class T, class U, class V&gt; PyObject *get_iterator_next(T *self)
 {
     jboolean hasNext;
@@ -123,6 +134,34 @@
     return U::wrap_Object(next);
 }
 
+#ifdef _java_generics
+template&lt;class T, class U, class V&gt; PyObject *get_generic_iterator_next(T *self)
+{
+    jboolean hasNext;
+
+    OBJ_CALL(hasNext = self-&gt;object.hasNext());
+    if (!hasNext)
+    {
+        PyErr_SetNone(PyExc_StopIteration);
+        return NULL;
+    }
+
+    V next((jobject) NULL);
+    OBJ_CALL(next = self-&gt;object.next());
+
+    jclass cls = java::lang::String::initializeClass();
+    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
+        return env-&gt;fromJString((jstring) next.this$);
+
+    PyTypeObject *param = self-&gt;parameters ? self-&gt;parameters[0] : NULL;
+
+    if (param != NULL)
+        return wrapType(param, next.this$);
+
+    return U::wrap_Object(next);
+}
+#endif
+
 template&lt;class T, class U, class V&gt; PyObject *get_enumeration_next(T *self)
 {
     jboolean hasMoreElements;
@@ -144,6 +183,34 @@
     return U::wrap_Object(next);
 }
 
+#ifdef _java_generics
+template&lt;class T, class U, class V&gt; PyObject *get_generic_enumeration_next(T *self)
+{
+    jboolean hasMoreElements;
+
+    OBJ_CALL(hasMoreElements = self-&gt;object.hasMoreElements());
+    if (!hasMoreElements)
+    {
+        PyErr_SetNone(PyExc_StopIteration);
+        return NULL;
+    }
+
+    V next((jobject) NULL);
+    OBJ_CALL(next = self-&gt;object.nextElement());
+
+    jclass cls = java::lang::String::initializeClass();
+    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
+        return env-&gt;fromJString((jstring) next.this$);
+
+    PyTypeObject *param = self-&gt;parameters ? self-&gt;parameters[0] : NULL;
+
+    if (param != NULL)
+        return wrapType(param, next.this$);
+
+    return U::wrap_Object(next);
+}
+#endif
+
 template&lt;class T, class U, class V&gt; PyObject *get_next(T *self)
 {
     V next((jobject) NULL);
@@ -162,6 +229,31 @@
     return U::wrap_Object(next);
 }
 
+#ifdef _java_generics
+template&lt;class T, class U, class V&gt; PyObject *get_generic_next(T *self)
+{
+    V next((jobject) NULL);
+
+    OBJ_CALL(next = self-&gt;object.next());
+    if (!next)
+    {
+        PyErr_SetNone(PyExc_StopIteration);
+        return NULL;
+    }
+        
+    jclass cls = java::lang::String::initializeClass();
+    if (env-&gt;get_vm_env()-&gt;IsInstanceOf(next.this$, cls))
+        return env-&gt;fromJString((jstring) next.this$);
+
+    PyTypeObject *param = self-&gt;parameters ? self-&gt;parameters[0] : NULL;
+
+    if (param != NULL)
+        return wrapType(param, next.this$);
+
+    return U::wrap_Object(next);
+}
+#endif
+
 PyObject *get_extension_iterator(PyObject *self);
 PyObject *get_extension_next(PyObject *self);
 PyObject *get_extension_nextElement(PyObject *self);

Modified: lucene/pylucene/trunk/samples/IndexFiles.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/IndexFiles.py?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/IndexFiles.py (original)
+++ lucene/pylucene/trunk/samples/IndexFiles.py Fri Oct 16 01:00:52 2009
@@ -30,8 +30,9 @@
 
         if not os.path.exists(storeDir):
             os.mkdir(storeDir)
-        store = lucene.FSDirectory.getDirectory(storeDir, True)
-        writer = lucene.IndexWriter(store, analyzer, True)
+        store = lucene.SimpleFSDirectory(lucene.File(storeDir))
+        writer = lucene.IndexWriter(store, analyzer, True,
+                                    lucene.IndexWriter.MaxFieldLength.LIMITED)
         writer.setMaxFieldLength(1048576)
         self.indexDocs(root, writer)
         ticker = Ticker()
@@ -56,14 +57,14 @@
                     doc = lucene.Document()
                     doc.add(lucene.Field("name", filename,
                                          lucene.Field.Store.YES,
-                                         lucene.Field.Index.UN_TOKENIZED))
+                                         lucene.Field.Index.NOT_ANALYZED))
                     doc.add(lucene.Field("path", path,
                                          lucene.Field.Store.YES,
-                                         lucene.Field.Index.UN_TOKENIZED))
+                                         lucene.Field.Index.NOT_ANALYZED))
                     if len(contents) &gt; 0:
                         doc.add(lucene.Field("contents", contents,
                                              lucene.Field.Store.NO,
-                                             lucene.Field.Index.TOKENIZED))
+                                             lucene.Field.Index.ANALYZED))
                     else:
                         print "warning: no content in %s" % filename
                     writer.addDocument(doc)
@@ -74,7 +75,7 @@
     if len(sys.argv) &lt; 2:
         print IndexFiles.__doc__
         sys.exit(1)
-    lucene.initVM(lucene.CLASSPATH)
+    lucene.initVM()
     print 'lucene', lucene.VERSION
     start = datetime.now()
     try:

Modified: lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py (original)
+++ lucene/pylucene/trunk/samples/PorterStemmerAnalyzer.py Fri Oct 16 01:00:52 2009
@@ -49,7 +49,7 @@
     if len(sys.argv) &lt; 2:
         print IndexFiles.__doc__
         sys.exit(1)
-    initVM(CLASSPATH)
+    initVM()
     print 'lucene', VERSION
     start = datetime.now()
     try:

Modified: lucene/pylucene/trunk/samples/SearchFiles.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/SearchFiles.py?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/SearchFiles.py (original)
+++ lucene/pylucene/trunk/samples/SearchFiles.py Fri Oct 16 01:00:52 2009
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 from lucene import \
-    QueryParser, IndexSearcher, StandardAnalyzer, FSDirectory, Hit, \
-    VERSION, initVM, CLASSPATH
+    QueryParser, IndexSearcher, StandardAnalyzer, SimpleFSDirectory, File, \
+    VERSION, initVM
 
 
 """
@@ -24,20 +24,20 @@
         print
         print "Searching for:", command
         query = QueryParser("contents", analyzer).parse(command)
-        hits = searcher.search(query)
-        print "%s total matching documents." % hits.length()
+        scoreDocs = searcher.search(query, 50).scoreDocs
+        print "%s total matching documents." % len(scoreDocs)
 
-        for hit in hits:
-            doc = Hit.cast_(hit).getDocument()
+        for scoreDoc in scoreDocs:
+            doc = searcher.doc(scoreDoc.doc)
             print 'path:', doc.get("path"), 'name:', doc.get("name")
 
 
 if __name__ == '__main__':
     STORE_DIR = "index"
-    initVM(CLASSPATH)
+    initVM()
     print 'lucene', VERSION
-    directory = FSDirectory.getDirectory(STORE_DIR, False)
-    searcher = IndexSearcher(directory)
+    directory = SimpleFSDirectory(File(STORE_DIR))
+    searcher = IndexSearcher(directory, True)
     analyzer = StandardAnalyzer()
     run(searcher, analyzer)
     searcher.close()

Modified: lucene/pylucene/trunk/samples/TermPositionVector.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/TermPositionVector.py?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/TermPositionVector.py (original)
+++ lucene/pylucene/trunk/samples/TermPositionVector.py Fri Oct 16 01:00:52 2009
@@ -1,24 +1,25 @@
 from lucene import \
     StandardAnalyzer, RAMDirectory, Document, Field, \
-    IndexWriter, IndexReader, TermPositionVector, initVM, CLASSPATH
+    IndexWriter, IndexReader, TermPositionVector, initVM
 
 if __name__ == '__main__':
-    initVM(CLASSPATH)
+    initVM()
 
 directory = RAMDirectory()
-iwriter = IndexWriter(directory, StandardAnalyzer(), True)
+iwriter = IndexWriter(directory, StandardAnalyzer(), True,
+                      IndexWriter.MaxFieldLength.LIMITED)
 ts = ["this bernhard is the text to be index text",
       "this claudia is the text to be index"]
 for t in ts:
     doc = Document()
     doc.add(Field("fieldname", t,
-                  Field.Store.YES, Field.Index.TOKENIZED,
+                  Field.Store.YES, Field.Index.ANALYZED,
                   Field.TermVector.WITH_POSITIONS_OFFSETS))
     iwriter.addDocument(doc)
 iwriter.optimize()
 iwriter.close()
 
-ireader = IndexReader.open(directory)
+ireader = IndexReader.open(directory, True)
 tpv = TermPositionVector.cast_(ireader.getTermFreqVector(0, 'fieldname'))
 
 for (t,f,i) in zip(tpv.getTerms(),tpv.getTermFrequencies(),xrange(100000)):

Modified: lucene/pylucene/trunk/samples/ThreadIndexFiles.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/ThreadIndexFiles.py?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/ThreadIndexFiles.py (original)
+++ lucene/pylucene/trunk/samples/ThreadIndexFiles.py Fri Oct 16 01:00:52 2009
@@ -15,8 +15,9 @@
 # This sample illustrates how to use a thread with PyLucene
 
 import sys, os, threading
+
 from datetime import datetime
-from lucene import StandardAnalyzer, VERSION, initVM, CLASSPATH
+from lucene import StandardAnalyzer, VERSION, initVM
 from IndexFiles import IndexFiles
 
 
@@ -24,7 +25,7 @@
     if len(sys.argv) &lt; 2:
         print IndexFiles.__doc__
         sys.exit(1)
-    env=initVM(CLASSPATH)
+    env=initVM()
     print 'lucene', VERSION
 
     def fn():

Modified: lucene/pylucene/trunk/samples/manindex.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/manindex.py?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/manindex.py (original)
+++ lucene/pylucene/trunk/samples/manindex.py Fri Oct 16 01:00:52 2009
@@ -21,7 +21,7 @@
 import os, re, sys
 from subprocess import *
 from lucene import IndexWriter, StandardAnalyzer, Document, Field
-from lucene import initVM, CLASSPATH
+from lucene import SimpleFSDirectory, File, initVM
 
 def indexDirectory(dir):
 
@@ -63,17 +63,17 @@
 
     doc = Document()
     doc.add(Field("command", command,
-                  Field.Store.YES, Field.Index.UN_TOKENIZED))
+                  Field.Store.YES, Field.Index.NOT_ANALYZED))
     doc.add(Field("section", section,
-                  Field.Store.YES, Field.Index.UN_TOKENIZED))
+                  Field.Store.YES, Field.Index.NOT_ANALYZED))
     doc.add(Field("name", name.strip(),
-                  Field.Store.YES, Field.Index.TOKENIZED))
+                  Field.Store.YES, Field.Index.ANALYZED))
     doc.add(Field("synopsis", synopsis.strip(),
-                  Field.Store.YES, Field.Index.TOKENIZED))
+                  Field.Store.YES, Field.Index.ANALYZED))
     doc.add(Field("keywords", ' '.join((command, name, synopsis, description)),
-                  Field.Store.NO, Field.Index.TOKENIZED))
+                  Field.Store.NO, Field.Index.ANALYZED))
     doc.add(Field("filename", os.path.abspath(path),
-                  Field.Store.YES, Field.Index.UN_TOKENIZED))
+                  Field.Store.YES, Field.Index.NOT_ANALYZED))
 
     writer.addDocument(doc)
 
@@ -84,9 +84,11 @@
         print "Usage: python manindex.py &lt;index dir&gt;"
 
     else:
-        initVM(CLASSPATH)
+        initVM()
         indexDir = sys.argv[1]
-        writer = IndexWriter(indexDir, StandardAnalyzer(), True)
+        writer = IndexWriter(SimpleFSDirectory(File(indexDir)),
+                             StandardAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.LIMITED)
         manpath = os.environ.get('MANPATH', '/usr/share/man').split(os.pathsep)
         for dir in manpath:
             print "Crawling", dir

Modified: lucene/pylucene/trunk/samples/mansearch.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/mansearch.py?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/samples/mansearch.py (original)
+++ lucene/pylucene/trunk/samples/mansearch.py Fri Oct 16 01:00:52 2009
@@ -28,11 +28,11 @@
 from getopt import getopt, GetoptError
 
 from lucene import \
-     Document, IndexSearcher, FSDirectory, QueryParser, StandardAnalyzer, \
-     Hit, Field, initVM, CLASSPATH
+     Document, IndexSearcher, SimpleFSDirectory, File, QueryParser, \
+     StandardAnalyzer, initVM
 
 if __name__ == '__main__':
-    initVM(CLASSPATH)
+    initVM()
 
 def usage():
     print sys.argv[0], "[--format=&lt;format string&gt;] [--index=&lt;index dir&gt;] [--stats]
&lt;query...&gt;"
@@ -62,20 +62,20 @@
 
 template = CustomTemplate(format)
 
-fsDir = FSDirectory.getDirectory(indexDir, False)
-searcher = IndexSearcher(fsDir)
+fsDir = SimpleFSDirectory(File(indexDir))
+searcher = IndexSearcher(fsDir, True)
 
 parser = QueryParser("keywords", StandardAnalyzer())
 parser.setDefaultOperator(QueryParser.Operator.AND)
 query = parser.parse(' '.join(args))
 start = datetime.now()
-hits = searcher.search(query)
+scoreDocs = searcher.search(query, 50).scoreDocs
 duration = datetime.now() - start
 if stats:
-    print &gt;&gt; sys.stderr, "Found %d document(s) (in %s) that matched query '%s':" %(len(hits),
duration, query)
+    print &gt;&gt;sys.stderr, "Found %d document(s) (in %s) that matched query '%s':" %(len(scoreDocs),
duration, query)
 
-for hit in hits:
-    doc = Hit.cast_(hit).getDocument()
+for scoreDoc in scoreDocs:
+    doc = searcher.doc(scoreDoc.doc)
     table = dict((field.name(), field.stringValue())
-                 for field in (Field.cast_(f) for f in doc.getFields()))
+                 for field in doc.getFields())
     print template.substitute(table)

Modified: lucene/pylucene/trunk/test/test_PythonDirectory.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PythonDirectory.py?rev=825722&amp;r1=825721&amp;r2=825722&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PythonDirectory.py (original)
+++ lucene/pylucene/trunk/test/test_PythonDirectory.py Fri Oct 16 01:00:52 2009
@@ -55,6 +55,7 @@
     
     def __init__(self, name, path, lock):
         super(PythonDirLock, self).__init__()
+
         self.name = name
         self.lock_file = path
         self.lock = lock




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825394 - in /lucene/pylucene/trunk: ./ java/org/apache/pylucene/search/ java/org/apache/pylucene/store/ jcc/ jcc/jcc/sources/ test/</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091015050737.BA2A523888D1@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091015050737-BA2A523888D1@eris-apache-org%3e</id>
<updated>2009-10-15T05:07:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Thu Oct 15 05:07:36 2009
New Revision: 825394

URL: http://svn.apache.org/viewvc?rev=825394&amp;view=rev
Log:
PyLucene 3.0.0 unit tests caught up with Lucene 3.0.0

Added:
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java   (with props)
    lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLockFactory.java   (with props)
    lucene/pylucene/trunk/test/BaseTestRangeFilter.py   (with props)
    lucene/pylucene/trunk/test/test_TermRangeFilter.py
      - copied, changed from r824626, lucene/pylucene/trunk/test/test_RangeFilter.py
    lucene/pylucene/trunk/test/test_TermRangeQuery.py
      - copied, changed from r824626, lucene/pylucene/trunk/test/test_RangeQuery.py
Removed:
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonHitCollector.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonScoreDocComparator.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSortComparator.java
    lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonSortComparatorSource.java
    lucene/pylucene/trunk/test/test_RangeFilter.py
    lucene/pylucene/trunk/test/test_RangeQuery.py
Modified:
    lucene/pylucene/trunk/Makefile
    lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonDirectory.java
    lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLock.java
    lucene/pylucene/trunk/jcc/CHANGES
    lucene/pylucene/trunk/jcc/jcc/sources/JArray.cpp
    lucene/pylucene/trunk/jcc/jcc/sources/JArray.h
    lucene/pylucene/trunk/test/test_BinaryDocument.py
    lucene/pylucene/trunk/test/test_DocBoost.py
    lucene/pylucene/trunk/test/test_FilteredQuery.py
    lucene/pylucene/trunk/test/test_PositionIncrement.py
    lucene/pylucene/trunk/test/test_PythonDirectory.py
    lucene/pylucene/trunk/test/test_Similarity.py
    lucene/pylucene/trunk/test/test_Sort.py
    lucene/pylucene/trunk/test/test_bug1763.py

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Thu Oct 15 05:07:36 2009
@@ -14,7 +14,7 @@
 # site-packages directory.
 #
 
-VERSION=3.0.0-1
+VERSION=3.0.0-0
 LUCENE_SVN_VER=HEAD
 LUCENE_VER=3.0.0
 LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/trunk
@@ -199,6 +199,7 @@
            --package java.util \
                      java.util.Arrays \
                      java.text.SimpleDateFormat \
+                     java.text.Collator \
            --package java.io java.io.StringReader \
                              java.io.InputStreamReader \
                              java.io.FileInputStream \

Added: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java?rev=825394&amp;view=auto
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java (added)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java Thu Oct 15 05:07:36 2009
@@ -0,0 +1,68 @@
+/* ====================================================================
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ * ====================================================================
+ */
+
+package org.apache.pylucene.search;
+
+import java.io.IOException;
+
+import org.apache.lucene.search.Collector;
+import org.apache.lucene.search.Scorer;
+import org.apache.lucene.index.IndexReader;
+
+
+public class PythonCollector extends Collector {
+
+    private long pythonObject;
+
+    public PythonCollector()
+    {
+    }
+
+    public void pythonExtension(long pythonObject)
+    {
+        this.pythonObject = pythonObject;
+    }
+    public long pythonExtension()
+    {
+        return this.pythonObject;
+    }
+
+    public void finalize()
+        throws Throwable
+    {
+        pythonDecRef();
+    }
+
+    Scorer scorer;
+
+    public void setScorer(Scorer scorer)
+        throws IOException
+    {
+        this.scorer = scorer;
+    }
+
+    public void collect(int doc)
+        throws IOException
+    {
+        collect(doc, scorer.score());
+    }
+
+    public native void pythonDecRef();
+    public native void collect(int doc, float score)
+        throws IOException;
+    public native void setNextReader(IndexReader reader, int docBase)
+        throws IOException;
+    public native boolean acceptsDocsOutOfOrder();
+}

Propchange: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/pylucene/trunk/java/org/apache/pylucene/search/PythonCollector.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonDirectory.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonDirectory.java?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonDirectory.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonDirectory.java Thu Oct 15 05:07:36 2009
@@ -20,15 +20,16 @@
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.store.IndexOutput;
-import org.apache.lucene.store.Lock;
+import org.apache.lucene.store.LockFactory;
 
 
 public class PythonDirectory extends Directory {
 
     private long pythonObject;
 
-    public PythonDirectory()
+    public PythonDirectory(LockFactory factory)
     {
+        setLockFactory(factory);
     }
 
     public void pythonExtension(long pythonObject)

Modified: lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLock.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLock.java?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLock.java (original)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLock.java Thu Oct 15 05:07:36 2009
@@ -44,6 +44,5 @@
     public native void pythonDecRef();
     public native boolean isLocked();
     public native boolean obtain();
-    public native boolean obtain(long lockWaitTimeout);
     public native void release();
 }

Added: lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLockFactory.java?rev=825394&amp;view=auto
==============================================================================
--- lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLockFactory.java (added)
+++ lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLockFactory.java Thu Oct 15 05:07:36 2009
@@ -0,0 +1,52 @@
+/* ====================================================================
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ * ====================================================================
+ */
+
+package org.apache.pylucene.store;
+
+import java.io.IOException;
+
+import org.apache.lucene.store.Lock;
+import org.apache.lucene.store.LockFactory;
+
+
+public class PythonLockFactory extends LockFactory {
+
+    private long pythonObject;
+
+    public PythonLockFactory()
+    {
+    }
+
+    public void pythonExtension(long pythonObject)
+    {
+        this.pythonObject = pythonObject;
+    }
+    public long pythonExtension()
+    {
+        return this.pythonObject;
+    }
+
+    public void finalize()
+        throws Throwable
+    {
+        pythonDecRef();
+    }
+
+    public native void pythonDecRef();
+
+    public native Lock makeLock(String lockName);
+    public native void clearLock(String lockName)
+        throws IOException;
+}

Propchange: lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLockFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/pylucene/trunk/java/org/apache/pylucene/store/PythonLockFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: lucene/pylucene/trunk/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/CHANGES?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/CHANGES (original)
+++ lucene/pylucene/trunk/jcc/CHANGES Thu Oct 15 05:07:36 2009
@@ -5,6 +5,7 @@
  - added env.java_version for java.lang.System.getProperty('java.version')
  - default value to initVM's classpath parameter now is importing module's
  - added (partial) support for Java generics
+ - added 'string_' property to JArray('byte') instances to extract byte string
  - 
 
 Version 2.3 -&gt; 2.4

Modified: lucene/pylucene/trunk/jcc/jcc/sources/JArray.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/JArray.cpp?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/JArray.cpp (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/JArray.cpp Thu Oct 15 05:07:36 2009
@@ -1139,6 +1139,17 @@
     return type;
 }
 
+static PyObject *t_jarray_jbyte__get_string_(t_jarray&lt;jbyte&gt; *self, void *data)
+{
+    return self-&gt;array.to_string_();
+}
+
+static PyGetSetDef t_jarray_jbyte__fields[] = {
+    { "string_", (getter) t_jarray_jbyte__get_string_, NULL, "", NULL },
+    { NULL, NULL, NULL, NULL, NULL }
+};
+
+
 PyTypeObject *JArrayObject$$Type;
 PyTypeObject *JArrayString$$Type;
 PyTypeObject *JArrayBool$$Type;
@@ -1150,6 +1161,7 @@
 PyTypeObject *JArrayLong$$Type;
 PyTypeObject *JArrayShort$$Type;
 
+
 void _install_jarray(PyObject *module)
 {
     jarray_jobject.install("JArray_object", "object",
@@ -1164,6 +1176,7 @@
                             "__JArray_bool_iterator", module);
     JArrayBool$$Type = &amp;jarray_jboolean.type_object;
 
+    jarray_jbyte.type_object.tp_getset = t_jarray_jbyte__fields;
     jarray_jbyte.install("JArray_byte", "byte",
                          "__JArray_byte_iterator", module);
     JArrayByte$$Type = &amp;jarray_jbyte.type_object;

Modified: lucene/pylucene/trunk/jcc/jcc/sources/JArray.h
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/sources/JArray.h?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/sources/JArray.h (original)
+++ lucene/pylucene/trunk/jcc/jcc/sources/JArray.h Thu Oct 15 05:07:36 2009
@@ -607,6 +607,17 @@
         return tuple;
     }
 
+    PyObject *to_string_()
+    {
+        if (this$ == NULL)
+            Py_RETURN_NONE;
+
+        arrayElements elts = elements();
+        jbyte *buf = (jbyte *) elts;
+
+        return PyString_FromStringAndSize((char *) buf, length);
+    }
+
     PyObject *get(int n)
     {
         if (this$ != NULL)

Added: lucene/pylucene/trunk/test/BaseTestRangeFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/BaseTestRangeFilter.py?rev=825394&amp;view=auto
==============================================================================
--- lucene/pylucene/trunk/test/BaseTestRangeFilter.py (added)
+++ lucene/pylucene/trunk/test/BaseTestRangeFilter.py Thu Oct 15 05:07:36 2009
@@ -0,0 +1,106 @@
+# ====================================================================
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+# ====================================================================
+
+from random import seed, randint
+from unittest import TestCase
+
+from lucene import *
+
+
+class BaseTestRangeFilter(TestCase):
+
+    def __init__(self, *args):
+
+        super(BaseTestRangeFilter, self).__init__(*args)
+
+        # 
+        # Collation interacts badly with hyphens -- collation produces
+        # different ordering than Unicode code-point ordering -- so two
+        # indexes are created: one which can't have negative random
+        # integers, for testing collated ranges, and the other which can
+        # have negative random integers, for all other tests.
+        #
+
+        self.MAX_INT = 0x7fffffff
+
+        class TestIndex(object):
+            def __init__(_self, minR, maxR, allowNegativeRandomInts):
+                _self.minR = minR
+                _self.maxR = maxR
+                _self.allowNegativeRandomInts = allowNegativeRandomInts
+                _self.index = RAMDirectory()
+
+        self.signedIndex = TestIndex(self.MAX_INT, ~self.MAX_INT, True)
+        self.unsignedIndex = TestIndex(self.MAX_INT, 0, False)
+
+        self.minId = 0
+        self.maxId = 10000
+
+        self.build(self.signedIndex)
+        self.build(self.unsignedIndex)
+
+    #
+    # a simple padding function that should work with any int
+    #
+
+    def pad(self, n):
+
+        if n &lt; 0:
+            return "-%0.10d" % (self.MAX_INT + n + 1)
+        else:
+            return "0%0.10d" % n
+
+    def build(self, index):
+
+        writer = IndexWriter(index.index, SimpleAnalyzer(), True, 
+                             IndexWriter.MaxFieldLength.LIMITED)
+
+        seed(101)
+        for d in xrange(self.minId, self.maxId + 1):
+            doc = Document()
+            doc.add(Field("id", self.pad(d), Field.Store.YES,
+                          Field.Index.NOT_ANALYZED));
+            if index.allowNegativeRandomInts:
+                r = randint(~self.MAX_INT, self.MAX_INT)
+            else:
+                r = randint(0, self.MAX_INT)
+
+            if index.maxR &lt; r:
+                index.maxR = r
+
+            if r &lt; index.minR:
+                index.minR = r
+
+            doc.add(Field("rand", self.pad(r), Field.Store.YES,
+                          Field.Index.NOT_ANALYZED))
+            doc.add(Field("body", "body", Field.Store.YES,
+                          Field.Index.NOT_ANALYZED));
+            writer.addDocument(doc)
+            
+        writer.optimize()
+        writer.close()
+
+    def testPad(self):
+
+        tests = [-9999999, -99560, -100, -3, -1, 0, 3, 9, 10, 1000, 999999999]
+
+        for i in xrange(0, len(tests) - 1):
+            a = tests[i]
+            b = tests[i + 1]
+            aa = self.pad(a)
+            bb = self.pad(b)
+            label = "%s:%s vs %s:%s" %(a, aa, b, bb)
+            self.assertEqual(len(aa), len(bb), "length of %s" %label)
+            self.assert_(aa &lt; bb, "compare less than %s" %label)
+

Propchange: lucene/pylucene/trunk/test/BaseTestRangeFilter.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/pylucene/trunk/test/BaseTestRangeFilter.py
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: lucene/pylucene/trunk/test/test_BinaryDocument.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_BinaryDocument.py?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_BinaryDocument.py (original)
+++ lucene/pylucene/trunk/test/test_BinaryDocument.py Thu Oct 15 05:07:36 2009
@@ -59,7 +59,8 @@
     
         # fetch the binary stored field and compare it's content with the
         # original one
-        binaryFldStoredTest = str(String(docFromReader.getBinaryValue("binaryStored")))
+        bytes = docFromReader.getBinaryValue("binaryStored")
+        binaryFldStoredTest = bytes.string_
         self.assertEqual(binaryFldStoredTest, self.binaryValStored)
         
         # fetch the string field and compare it's content with the original
@@ -98,7 +99,8 @@
     
         # fetch the binary compressed field and compare it's content with
         # the original one
-        binaryFldCompressedTest = str(String(CompressionTools.decompress(docFromReader.getBinaryValue("binaryCompressed"))))
+        bytes = CompressionTools.decompress(docFromReader.getBinaryValue("binaryCompressed"))
+        binaryFldCompressedTest = bytes.string_
         self.assertEqual(binaryFldCompressedTest, self.binaryValCompressed)
         self.assertEqual(CompressionTools.decompressString(docFromReader.getBinaryValue("stringCompressed")), self.binaryValCompressed)
 

Modified: lucene/pylucene/trunk/test/test_DocBoost.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_DocBoost.py?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_DocBoost.py (original)
+++ lucene/pylucene/trunk/test/test_DocBoost.py Thu Oct 15 05:07:36 2009
@@ -52,12 +52,20 @@
 
         scores = [0.0] * 4
 
-        class hitCollector(PythonHitCollector):
-            def collect(self, doc, score):
-                scores[doc] = score
+        class collector(PythonCollector):
+            def __init__(_self, scores):
+                super(collector, _self).__init__()
+                _self.scores = scores
+                _self.base = 0
+            def collect(_self, doc, score):
+                _self.scores[doc + _self.base] = score
+            def setNextReader(_self, reader, docBase):
+                _self.base = docBase
+            def acceptsDocsOutOfOrder(_self):
+                return True
 
         IndexSearcher(store, True).search(TermQuery(Term("field", "word")),
-                                          hitCollector())
+                                          collector(scores))
     
         lastScore = 0.0
         for score in scores:

Modified: lucene/pylucene/trunk/test/test_FilteredQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_FilteredQuery.py?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_FilteredQuery.py (original)
+++ lucene/pylucene/trunk/test/test_FilteredQuery.py Thu Oct 15 05:07:36 2009
@@ -86,7 +86,9 @@
         self.assertEqual(1, topDocs.totalHits)
         self.assertEqual(1, topDocs.scoreDocs[0].doc)
 
-        topDocs = self.searcher.search(filteredquery, None, 50, Sort("sorter"))
+        topDocs = self.searcher.search(filteredquery, None, 50,
+                                       Sort(SortField("sorter",
+                                                      SortField.STRING)))
         self.assertEqual(1, topDocs.totalHits)
         self.assertEqual(1, topDocs.scoreDocs[0].doc)
 

Modified: lucene/pylucene/trunk/test/test_PositionIncrement.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PositionIncrement.py?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PositionIncrement.py (original)
+++ lucene/pylucene/trunk/test/test_PositionIncrement.py Thu Oct 15 05:07:36 2009
@@ -191,89 +191,80 @@
 
     def testPayloadsPos0(self):
 
-        for x in xrange(2):
-            dir = RAMDirectory()
-            writer = IndexWriter(dir, TestPayloadAnalyzer(), True,
-                                 IndexWriter.MaxFieldLength.LIMITED)
-            if x == 1:
-                writer.setAllowMinus1Position()
-
-            doc = Document()
-            doc.add(Field("content",
-                          StringReader("a a b c d e a f g h i j a b k k")))
-            writer.addDocument(doc)
-
-            r = writer.getReader()
-
-            tp = r.termPositions(Term("content", "a"))
-            count = 0
-            self.assert_(tp.next())
-            # "a" occurs 4 times
-            self.assertEqual(4, tp.freq())
+        dir = RAMDirectory()
+        writer = IndexWriter(dir, TestPayloadAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.LIMITED)
+
+        doc = Document()
+        doc.add(Field("content",
+                      StringReader("a a b c d e a f g h i j a b k k")))
+        writer.addDocument(doc)
+
+        r = writer.getReader()
+
+        tp = r.termPositions(Term("content", "a"))
+        count = 0
+        self.assert_(tp.next())
+        # "a" occurs 4 times
+        self.assertEqual(4, tp.freq())
+
+        expected = 0
+        self.assertEqual(expected, tp.nextPosition())
+        self.assertEqual(1, tp.nextPosition())
+        self.assertEqual(3, tp.nextPosition())
+        self.assertEqual(6, tp.nextPosition())
 
-            if x == 1:
-                expected = Integer.MAX_VALUE
-            else:
-                expected = 0
+        # only one doc has "a"
+        self.assert_(not tp.next())
 
-            self.assertEqual(expected, tp.nextPosition())
-            if x == 1:
-                continue
+        searcher = IndexSearcher(r)
+    
+        stq1 = SpanTermQuery(Term("content", "a"))
+        stq2 = SpanTermQuery(Term("content", "k"))
+        sqs = [stq1, stq2]
+        snq = SpanNearQuery(sqs, 30, False)
+
+        count = 0
+        sawZero = False
+
+        pspans = snq.getSpans(searcher.getIndexReader())
+        while pspans.next():
+            payloads = pspans.getPayload()
+            sawZero |= pspans.start() == 0
 
-            self.assertEqual(1, tp.nextPosition())
-            self.assertEqual(3, tp.nextPosition())
-            self.assertEqual(6, tp.nextPosition())
+            it = payloads.iterator()
+            while it.hasNext():
+                count += 1
+                it.next()
 
-            # only one doc has "a"
-            self.assert_(not tp.next())
+        self.assertEqual(5, count)
+        self.assert_(sawZero)
 
-            searcher = IndexSearcher(r)
-    
-            stq1 = SpanTermQuery(Term("content", "a"))
-            stq2 = SpanTermQuery(Term("content", "k"))
-            sqs = [stq1, stq2]
-            snq = SpanNearQuery(sqs, 30, False)
-
-            count = 0
-            sawZero = False
-
-            pspans = snq.getSpans(searcher.getIndexReader())
-            while pspans.next():
-                payloads = pspans.getPayload()
-                sawZero |= pspans.start() == 0
-
-                it = payloads.iterator()
-                while it.hasNext():
-                    count += 1
-                    it.next()
-
-            self.assertEqual(5, count)
-            self.assert_(sawZero)
-
-            spans = snq.getSpans(searcher.getIndexReader())
-            count = 0
-            sawZero = False
-            while spans.next():
-                count += 1
-                sawZero |= spans.start() == 0
+        spans = snq.getSpans(searcher.getIndexReader())
+        count = 0
+        sawZero = False
+        while spans.next():
+            count += 1
+            sawZero |= spans.start() == 0
 
-            self.assertEqual(4, count)
-            self.assert_(sawZero)
+        self.assertEqual(4, count)
+        self.assert_(sawZero)
 		
-            sawZero = False
-            psu = PayloadSpanUtil(searcher.getIndexReader())
-            pls = psu.getPayloadsForQuery(snq)
-            count = pls.size()
-            it = pls.iterator()
-            while it.hasNext():
-                s = str(String(JArray('byte').cast_(it.next())))
-                sawZero |= s == "pos: 0"
-
-            self.assertEqual(5, count)
-            self.assert_(sawZero)
-            writer.close()
-            searcher.getIndexReader().close()
-            dir.close()
+        sawZero = False
+        psu = PayloadSpanUtil(searcher.getIndexReader())
+        pls = psu.getPayloadsForQuery(snq)
+        count = pls.size()
+        it = pls.iterator()
+        while it.hasNext():
+            bytes = JArray('byte').cast_(it.next())
+            s = bytes.string_
+            sawZero |= s == "pos: 0"
+
+        self.assertEqual(5, count)
+        self.assert_(sawZero)
+        writer.close()
+        searcher.getIndexReader().close()
+        dir.close()
 
 
 class StopWhitespaceAnalyzer(PythonAnalyzer):

Modified: lucene/pylucene/trunk/test/test_PythonDirectory.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PythonDirectory.py?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PythonDirectory.py (original)
+++ lucene/pylucene/trunk/test/test_PythonDirectory.py Thu Oct 15 05:07:36 2009
@@ -17,8 +17,9 @@
 import test_PyLucene 
 
 from lucene import \
-    PythonLock, PythonIndexInput, PythonIndexOutput, PythonDirectory, \
-    JavaError, IOException, JArray
+    PythonLock, PythonLockFactory, \
+    PythonIndexInput, PythonIndexOutput, PythonDirectory, \
+    JavaError, IOException, JArray, String
 
 """
 The Directory Implementation here is for testing purposes only, not meant
@@ -61,15 +62,37 @@
     def isLocked(self):
         return self.lock.locked()
 
-    def obtain(self, timeout=None):
-        if timeout is not None:
-            return self.lock.acquire(timeout)
+    def obtain(self):
         return self.lock.acquire()
 
     def release(self):
         return self.lock.release()
 
 
+class PythonDirLockFactory(PythonLockFactory):
+
+    def __init__(self, path):
+        super(PythonDirLockFactory, self).__init__()
+        
+        self.path = path
+        self._locks = {}
+
+    def makeLock(self, name):
+
+        lock = self._locks.get(name)
+        if lock is None:
+            lock = PythonDirLock(name, os.path.join(self.path, name), RLock())
+            self._locks[name] = lock
+
+        return lock
+
+    def clearLock(self, name):
+
+        lock = self._locks.pop(name, None)
+        if lock is not None:
+            lock.release()
+
+
 class PythonFileStreamInput(PythonIndexInput):
 
     def __init__(self, name, fh, size, clone=False):
@@ -123,27 +146,27 @@
     def seekInternal(self, pos):
         self.fh.seek(pos)
 
-    def flushBuffer(self, buffer):
-        self.fh.write(''.join(buffer))
+    def flushBuffer(self, bytes):
+
+        self.fh.write(bytes.string_)
         self.fh.flush()
-        self._length += len(buffer)
+        self._length += len(bytes)
 
 
 class PythonFileDirectory(PythonDirectory):
 
     def __init__(self, path):
-        super(PythonFileDirectory, self).__init__()
+        super(PythonFileDirectory, self).__init__(PythonDirLockFactory(path))
+
         self.name = path
         assert os.path.isdir(path)
         self.path = path
-        self._locks = {}
         self._streams = []
 
     def close(self):
         for stream in self._streams:
             stream.close()
         del self._streams[:]
-        self._locks.clear()
 
     def createOutput(self, name):
         file_path = os.path.join(self.path, name)
@@ -167,15 +190,11 @@
         file_path = os.path.join(self.path, name)
         return os.path.getmtime(file_path)
 
-    def list(self):
+    def listAll(self):
         return os.listdir(self.path)
 
-    def makeLock(self, name):
-        lock = self._locks.get(name)
-        if lock is None:
-            lock = PythonDirLock(name, os.path.join(self.path, name), RLock())
-            self._locks[name] = lock
-        return lock
+    def sync(self, name):
+        pass
 
     def openInput(self, name, bufferSize=0):
         file_path = os.path.join(self.path, name)

Modified: lucene/pylucene/trunk/test/test_Similarity.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Similarity.py?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Similarity.py (original)
+++ lucene/pylucene/trunk/test/test_Similarity.py Thu Oct 15 05:07:36 2009
@@ -73,33 +73,41 @@
         b = Term("field", "b")
         c = Term("field", "c")
 
-        class hitCollector1(PythonHitCollector):
+        class collector1(PythonCollector):
             def __init__(_self, score):
-                super(hitCollector1, _self).__init__()
+                super(collector1, _self).__init__()
                 _self.score = score
             def collect(_self, doc, score):
                 self.assertEqual(score, _self.score)
+            def setNextReader(_self, reader, docBase):
+                pass
+            def acceptsDocsOutOfOrder(_self):
+                return True
 
-        searcher.search(TermQuery(b), hitCollector1(1.0))
+        searcher.search(TermQuery(b), collector1(1.0))
 
         bq = BooleanQuery()
         bq.add(TermQuery(a), BooleanClause.Occur.SHOULD)
         bq.add(TermQuery(b), BooleanClause.Occur.SHOULD)
 
-        class hitCollector2(PythonHitCollector):
+        class collector2(PythonCollector):
             def collect(_self, doc, score):
                 self.assertEqual(score, doc + 1)
+            def setNextReader(_self, reader, docBase):
+                pass
+            def acceptsDocsOutOfOrder(_self):
+                return True
 
-        searcher.search(bq, hitCollector2())
+        searcher.search(bq, collector2())
 
         pq = PhraseQuery()
         pq.add(a)
         pq.add(c)
 
-        searcher.search(pq, hitCollector1(1.0))
+        searcher.search(pq, collector1(1.0))
 
         pq.setSlop(2)
-        searcher.search(pq, hitCollector1(2.0))
+        searcher.search(pq, collector1(2.0))
 
 
 if __name__ == "__main__":

Modified: lucene/pylucene/trunk/test/test_Sort.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Sort.py?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Sort.py (original)
+++ lucene/pylucene/trunk/test/test_Sort.py Thu Oct 15 05:07:36 2009
@@ -390,24 +390,6 @@
         sort.setSort([SortField("parser", MyFieldComparatorSource())])
         self._assertMatches(self.full, self.queryA, sort, "JIHGFEDCBA")
 
-    def testAutoSort(self):
-        """
-        test sorts where the type of field is determined dynamically
-        """
-        sort = Sort()
-
-        sort.setSort("int")
-        self._assertMatches(self.full, self.queryX, sort, "IGAEC")
-        self._assertMatches(self.full, self.queryY, sort, "DHFJB")
-
-        sort.setSort("float")
-        self._assertMatches(self.full, self.queryX, sort, "GCIEA")
-        self._assertMatches(self.full, self.queryY, sort, "DHJFB")
-
-        sort.setSort("string")
-        self._assertMatches(self.full, self.queryX, sort, "AIGEC")
-        self._assertMatches(self.full, self.queryY, sort, "DJHFB")
-
     def testReverseSort(self):
         """
         test sorts in reverse
@@ -423,15 +405,15 @@
         self._assertMatches(self.full, self.queryX, sort, "IGECA")
         self._assertMatches(self.full, self.queryY, sort, "JHFDB")
 
-        sort.setSort("int", True)
+        sort.setSort(SortField("int", SortField.INT, True))
         self._assertMatches(self.full, self.queryX, sort, "CAEGI")
         self._assertMatches(self.full, self.queryY, sort, "BJFHD")
 
-        sort.setSort("float", True)
+        sort.setSort(SortField("float", SortField.FLOAT, True))
         self._assertMatches(self.full, self.queryX, sort, "AECIG")
         self._assertMatches(self.full, self.queryY, sort, "BFJHD")
 
-        sort.setSort("string", True)
+        sort.setSort(SortField("string", SortField.STRING, True))
         self._assertMatches(self.full, self.queryX, sort, "CEGIA")
         self._assertMatches(self.full, self.queryY, sort, "BFHJD")
 
@@ -442,10 +424,10 @@
         """
         sort = Sort()
 
-        sort.setSort("string")
+        sort.setSort(SortField("string", SortField.STRING))
         self._assertMatches(self.full, self.queryF, sort, "ZJI")
 
-        sort.setSort("string", True)
+        sort.setSort(SortField("string", SortField.STRING, True))
         self._assertMatches(self.full, self.queryF, sort, "IJZ")
     
         sort.setSort(SortField("i18n", Locale.ENGLISH))
@@ -454,64 +436,64 @@
         sort.setSort(SortField("i18n", Locale.ENGLISH, True))
         self._assertMatches(self.full, self.queryF, sort, "IJZ")
 
-        sort.setSort("int")
+        sort.setSort(SortField("int", SortField.INT))
         self._assertMatches(self.full, self.queryF, sort, "IZJ")
 
-        sort.setSort("int", True)
+        sort.setSort(SortField("int", SortField.INT, True))
         self._assertMatches(self.full, self.queryF, sort, "JZI")
 
-        sort.setSort("float")
+        sort.setSort(SortField("float", SortField.FLOAT))
         self._assertMatches(self.full, self.queryF, sort, "ZJI")
 
         # using a nonexisting field as first sort key shouldn't make a
         # difference:
         sort.setSort([SortField("nosuchfield", SortField.STRING),
-                      SortField("float")])
+                      SortField("float", SortField.FLOAT)])
         self._assertMatches(self.full, self.queryF, sort, "ZJI")
 
-        sort.setSort("float", True)
+        sort.setSort(SortField("float", SortField.FLOAT, True))
         self._assertMatches(self.full, self.queryF, sort, "IJZ")
 
         # When a field is None for both documents, the next SortField should
         # be used. 
         # Works for
-        sort.setSort([SortField("int"),
+        sort.setSort([SortField("int", SortField.INT),
                       SortField("string", SortField.STRING),
-                      SortField("float")])
+                      SortField("float", SortField.FLOAT)])
         self._assertMatches(self.full, self.queryG, sort, "ZWXY")
 
         # Reverse the last criterium to make sure the test didn't pass by
         # chance 
-        sort.setSort([SortField("int"),
+        sort.setSort([SortField("int", SortField.INT),
                       SortField("string", SortField.STRING),
-                      SortField("float", True)])
+                      SortField("float", SortField.FLOAT, True)])
         self._assertMatches(self.full, self.queryG, sort, "ZYXW")
 
         # Do the same for a MultiSearcher
         multiSearcher = MultiSearcher([self.full])
 
-        sort.setSort([SortField("int"),
+        sort.setSort([SortField("int", SortField.INT),
                       SortField("string", SortField.STRING),
-                      SortField("float")])
+                      SortField("float", SortField.FLOAT)])
         self._assertMatches(multiSearcher, self.queryG, sort, "ZWXY")
 
-        sort.setSort([SortField("int"),
+        sort.setSort([SortField("int", SortField.INT),
                       SortField("string", SortField.STRING),
-                      SortField("float", True)])
+                      SortField("float", SortField.FLOAT, True)])
         self._assertMatches(multiSearcher, self.queryG, sort, "ZYXW")
 
         # Don't close the multiSearcher. it would close the full searcher too!
         # Do the same for a ParallelMultiSearcher
         parallelSearcher = ParallelMultiSearcher([self.full])
 
-        sort.setSort([SortField("int"),
+        sort.setSort([SortField("int", SortField.INT),
                       SortField("string", SortField.STRING),
-                      SortField("float")])
+                      SortField("float", SortField.FLOAT)])
         self._assertMatches(parallelSearcher, self.queryG, sort, "ZWXY")
 
-        sort.setSort([SortField("int"),
+        sort.setSort([SortField("int", SortField.INT),
                       SortField("string", SortField.STRING),
-                      SortField("float", True)])
+                      SortField("float", SortField.FLOAT, True)])
         self._assertMatches(parallelSearcher, self.queryG, sort, "ZYXW")
 
         # Don't close the parallelSearcher. it would close the full searcher
@@ -523,14 +505,16 @@
         """
         sort = Sort()
 
-        sort.setSort(["int", "float"])
+        sort.setSort([SortField("int", SortField.INT),
+                      SortField("float", SortField.FLOAT)])
         self._assertMatches(self.full, self.queryX, sort, "IGEAC")
 
-        sort.setSort([SortField("int", True),
+        sort.setSort([SortField("int", SortField.INT, True),
                       SortField(None, SortField.DOC, True)])
         self._assertMatches(self.full, self.queryX, sort, "CEAGI")
 
-        sort.setSort(["float", "string"])
+        sort.setSort([SortField("float", SortField.FLOAT),
+                      SortField("string", SortField.STRING)])
         self._assertMatches(self.full, self.queryX, sort, "GICEA")
 
     def testLocaleSort(self):
@@ -586,26 +570,6 @@
         sort.setSort(SortField("i18n", Locale("da", "dk")))
         self._assertMatches(multiSearcher, self.queryY, sort, "BJDHF")
     
-    def _testCustomSorts(self):
-        """
-        test a custom sort function
-        """
-        sort = Sort()
-
-        sort.setSort(SortField("custom",
-                               SampleComparable.getComparatorSource()))
-        self._assertMatches(self.full, self.queryX, sort, "CAIEG")
-
-        sort.setSort(SortField("custom",
-                               SampleComparable.getComparatorSource(), True))
-        self._assertMatches(self.full, self.queryY, sort, "HJDBF")
-
-        custom = SampleComparable.getComparator()
-        sort.setSort(SortField("custom", custom))
-        self._assertMatches(self.full, self.queryX, sort, "CAIEG")
-        sort.setSort(SortField("custom", custom, True))
-        self._assertMatches(self.full, self.queryY, sort, "HJDBF")
-
     def testMultiSort(self):
         """
         test a variety of sorts using more than one searcher
@@ -657,7 +621,7 @@
         self._assertSameValues(scoresA, self.getScores(self.full.search(self.queryA, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresA, self.getScores(multi.search(self.queryA, None, 1000, sort).scoreDocs, multi))
 
-        sort.setSort("int")
+        sort.setSort(SortField("int", SortField.INT))
         self._assertSameValues(scoresX, self.getScores(self.full.search(self.queryX, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresX, self.getScores(multi.search(self.queryX, None, 1000, sort).scoreDocs, multi))
         self._assertSameValues(scoresY, self.getScores(self.full.search(self.queryY, None, 1000, sort).scoreDocs, self.full))
@@ -665,7 +629,7 @@
         self._assertSameValues(scoresA, self.getScores(self.full.search(self.queryA, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresA, self.getScores(multi.search(self.queryA, None, 1000, sort).scoreDocs, multi))
 
-        sort.setSort("float")
+        sort.setSort(SortField("float", SortField.FLOAT))
         self._assertSameValues(scoresX, self.getScores(self.full.search(self.queryX, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresX, self.getScores(multi.search(self.queryX, None, 1000, sort).scoreDocs, multi))
         self._assertSameValues(scoresY, self.getScores(self.full.search(self.queryY, None, 1000, sort).scoreDocs, self.full))
@@ -673,7 +637,7 @@
         self._assertSameValues(scoresA, self.getScores(self.full.search(self.queryA, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresA, self.getScores(multi.search(self.queryA, None, 1000, sort).scoreDocs, multi))
 
-        sort.setSort("string")
+        sort.setSort(SortField("string", SortField.STRING))
         self._assertSameValues(scoresX, self.getScores(self.full.search(self.queryX, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresX, self.getScores(multi.search(self.queryX, None, 1000, sort).scoreDocs, multi))
         self._assertSameValues(scoresY, self.getScores(self.full.search(self.queryY, None, 1000, sort).scoreDocs, self.full))
@@ -681,7 +645,8 @@
         self._assertSameValues(scoresA, self.getScores(self.full.search(self.queryA, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresA, self.getScores(multi.search(self.queryA, None, 1000, sort).scoreDocs, multi))
 
-        sort.setSort(["int", "float"])
+        sort.setSort([SortField("int", SortField.INT),
+                      SortField("float", SortField.FLOAT)])
         self._assertSameValues(scoresX, self.getScores(self.full.search(self.queryX, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresX, self.getScores(multi.search(self.queryX, None, 1000, sort).scoreDocs, multi))
         self._assertSameValues(scoresY, self.getScores(self.full.search(self.queryY, None, 1000, sort).scoreDocs, self.full))
@@ -689,7 +654,7 @@
         self._assertSameValues(scoresA, self.getScores(self.full.search(self.queryA, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresA, self.getScores(multi.search(self.queryA, None, 1000, sort).scoreDocs, multi))
 
-        sort.setSort([SortField("int", True),
+        sort.setSort([SortField("int", SortField.INT, True),
                       SortField(None, SortField.DOC, True)])
         self._assertSameValues(scoresX, self.getScores(self.full.search(self.queryX, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresX, self.getScores(multi.search(self.queryX, None, 1000, sort).scoreDocs, multi))
@@ -698,7 +663,8 @@
         self._assertSameValues(scoresA, self.getScores(self.full.search(self.queryA, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresA, self.getScores(multi.search(self.queryA, None, 1000, sort).scoreDocs, multi))
 
-        sort.setSort(["float", "string"])
+        sort.setSort([SortField("float", SortField.FLOAT),
+                      SortField("string", SortField.STRING)])
         self._assertSameValues(scoresX, self.getScores(self.full.search(self.queryX, None, 1000, sort).scoreDocs, self.full))
         self._assertSameValues(scoresX, self.getScores(multi.search(self.queryX, None, 1000, sort).scoreDocs, multi))
         self._assertSameValues(scoresY, self.getScores(self.full.search(self.queryY, None, 1000, sort).scoreDocs, self.full))
@@ -841,10 +807,6 @@
             "OutOfOrderOneComparatorScoringMaxScoreCollector" 
         ]
     
-        # Save the original value to set later.
-        origVal = BooleanQuery.getAllowDocsOutOfOrder()
-
-        BooleanQuery.setAllowDocsOutOfOrder(True)
         bq = BooleanQuery()
 
         # Add a Query with SHOULD, since bw.scorer() returns BooleanScorer2
@@ -855,26 +817,20 @@
         # return the clause instead of BQ.
         bq.setMinimumNumberShouldMatch(1)
 
-        try:
-            for sort in sorts:
-                for tfcOption, actualTFCClass in izip(tfcOptions,
-                                                      actualTFCClasses):
-                    tdc = TopFieldCollector.create(sort, 10, tfcOption[0],
-                                                   tfcOption[1], tfcOption[2],
-                                                   False)
+        for sort in sorts:
+            for tfcOption, actualTFCClass in izip(tfcOptions,
+                                                  actualTFCClasses):
+                tdc = TopFieldCollector.create(sort, 10, tfcOption[0],
+                                               tfcOption[1], tfcOption[2],
+                                               False)
 
-                    self.assert_(tdc.getClass().getName().endswith("$" + actualTFCClass))
+                self.assert_(tdc.getClass().getName().endswith("$" + actualTFCClass))
           
-                    self.full.search(bq, tdc)
+                self.full.search(bq, tdc)
           
-                    tds = tdc.topDocs()
-                    sds = tds.scoreDocs  
-                    self.assertEqual(10, len(sds))
-        finally:
-            # Whatever happens, reset BooleanQuery.allowDocsOutOfOrder to the
-            # original value. Don't set it to False in case the
-            # implementation in BQ will change some day.
-            BooleanQuery.setAllowDocsOutOfOrder(origVal)
+                tds = tdc.topDocs()
+                sds = tds.scoreDocs  
+                self.assertEqual(10, len(sds))
   
     def testSortWithScoreAndMaxScoreTrackingNoResults(self):
         """
@@ -906,48 +862,50 @@
         expected = isFull and "IDHFGJABEC" or "IDHFGJAEBC"
         self._assertMatches(multi, self.queryA, sort, expected)
 
-        sort.setSort("int")
+        sort.setSort(SortField("int", SortField.INT))
         expected = isFull and "IDHFGJABEC" or "IDHFGJAEBC"
         self._assertMatches(multi, self.queryA, sort, expected)
 
         sort.setSort([SortField("float", SortField.FLOAT), SortField.FIELD_DOC])
         self._assertMatches(multi, self.queryA, sort, "GDHJCIEFAB")
 
-        sort.setSort("float")
+        sort.setSort(SortField("float", SortField.FLOAT))
         self._assertMatches(multi, self.queryA, sort, "GDHJCIEFAB")
 
-        sort.setSort("string")
+        sort.setSort(SortField("string", SortField.STRING))
         self._assertMatches(multi, self.queryA, sort, "DJAIHGFEBC")
 
-        sort.setSort("int", True)
+        sort.setSort(SortField("int", SortField.INT, True))
         expected = isFull and "CABEJGFHDI" or "CAEBJGFHDI"
         self._assertMatches(multi, self.queryA, sort, expected)
 
-        sort.setSort("float", True)
+        sort.setSort(SortField("float", SortField.FLOAT, True))
         self._assertMatches(multi, self.queryA, sort, "BAFECIJHDG")
 
-        sort.setSort("string", True)
+        sort.setSort(SortField("string", SortField.STRING, True))
         self._assertMatches(multi, self.queryA, sort, "CBEFGHIAJD")
 
-        sort.setSort(["int", "float"])
+        sort.setSort([SortField("int", SortField.INT),
+                      SortField("float", SortField.FLOAT)])
         self._assertMatches(multi, self.queryA, sort, "IDHFGJEABC")
 
-        sort.setSort(["float", "string"])
+        sort.setSort([SortField("float", SortField.FLOAT),
+                      SortField("string", SortField.STRING)])
         self._assertMatches(multi, self.queryA, sort, "GDHJICEFAB")
 
-        sort.setSort("int")
+        sort.setSort(SortField("int", SortField.INT))
         self._assertMatches(multi, self.queryF, sort, "IZJ")
 
-        sort.setSort("int", True)
+        sort.setSort(SortField("int", SortField.INT, True))
         self._assertMatches(multi, self.queryF, sort, "JZI")
 
-        sort.setSort("float")
+        sort.setSort(SortField("float", SortField.FLOAT))
         self._assertMatches(multi, self.queryF, sort, "ZJI")
 
-        sort.setSort("string")
+        sort.setSort(SortField("string", SortField.STRING))
         self._assertMatches(multi, self.queryF, sort, "ZJI")
 
-        sort.setSort("string", True)
+        sort.setSort(SortField("string", SortField.STRING, True))
         self._assertMatches(multi, self.queryF, sort, "IJZ")
 
         # up to this point, all of the searches should have "sane" 
@@ -1060,111 +1018,6 @@
         return MyFieldComparator(numHits)
 
 
-class SampleComparable(PythonComparable):
-
-    def __init__(self, s):
-        super(SampleComparable, self).__init__()
-
-        self.string_part, self.int_part = s.split('-', 1)
-        self.int_part = int(self.int_part)
-
-    def compareTo(self, o):
-
-        # The not-so-obvious code below first checks that o needs to be
-        # downcast into a SampleComparable, does it if needed, and sets it
-        # to the inner python instance to work, getting it through '.self'.
-        # If the compareTo() call came from Java then o may just be
-        # wrapped with java.lang.Object, hence not an instance of
-        # SampleComparable even though the actual Java object is.
-        # In that case isinstance() returns False but cast_() succeeds.
-        if not isinstance(o, SampleComparable):
-            o = SampleComparable.cast_(o).self
-
-        i = cmp(self.string_part, o.string_part)
-        if i == 0:
-            return cmp(self.int_part, o.int_part)
-
-        return i
-
-    def getComparatorSource(cls):
-
-        class sortComparatorSource(PythonSortComparatorSource):
-
-            def newComparator(_self, reader, fieldName):
-                enumerator = reader.terms(Term(fieldName, ""))
-                try:
-                    class scoreDocComparator(PythonScoreDocComparator):
-                        def __init__(self_):
-                            super(scoreDocComparator, self_).__init__()
-                            self_.cachedValues = _self.fillCache(reader, enumerator, fieldName)
-
-                        def compare(self_, i, j):
-                            return self_.cachedValues[i.doc].compareTo(self_.cachedValues[j.doc])
-
-                        def sortValue(self_, i):
-                            return self_.cachedValues[i.doc]
-
-                        def sortType(self_):
-                            return SortField.CUSTOM
-
-                    return scoreDocComparator()
-                finally:
-                    enumerator.close()
-
-            def fillCache(_self, reader, enumerator, fieldName):
-                """
-                Returns an array of objects which represent that natural order
-                of the term values in the given field.
-
-                param reader     Terms are in this index.
-                param enumerator Use this to get the term values and TermDocs.
-                param fieldName  Comparables should be for this field.
-                return Array of objects representing natural order of terms
-                       in field. 
-                throws IOException If an error occurs reading the index.
-                """
-                retArray = [None] * reader.maxDoc()
-                if len(retArray) &gt; 0:
-                    termDocs = reader.termDocs()
-                    try:
-                        if enumerator.term() is None:
-                            raise AssertionError, "no terms in field " + fieldName
-                        while True:
-                            term = enumerator.term()
-                            if term.field() != fieldName:
-                                break
-                            termval = _self.getComparable(term.text())
-                            termDocs.seek(enumerator)
-                            while termDocs.next():
-                                retArray[termDocs.doc()] = termval
-                            if not enumerator.next():
-                                break
-                    finally:
-                        termDocs.close()
-                return retArray
-
-            def getComparable(_self, termtext):
-                return SampleComparable(termtext)
-
-        return sortComparatorSource()
-
-    def getComparator(cls):
-
-        class sortComparator(PythonSortComparator):
-            def getComparable(_self, termtext):
-                return SampleComparable(termtext)
-
-            def hashCode(_self):
-                return _self.getClass().getName().hashCode()
-
-            def equals(_self, that):
-                return _self.getClass().equals(that.getClass())
-  
-        return sortComparator()
-
-    getComparatorSource = classmethod(getComparatorSource)
-    getComparator = classmethod(getComparator)
-
 
 if __name__ == "__main__":
     import sys, lucene

Copied: lucene/pylucene/trunk/test/test_TermRangeFilter.py (from r824626, lucene/pylucene/trunk/test/test_RangeFilter.py)
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_TermRangeFilter.py?p2=lucene/pylucene/trunk/test/test_TermRangeFilter.py&amp;p1=lucene/pylucene/trunk/test/test_RangeFilter.py&amp;r1=824626&amp;r2=825394&amp;rev=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_RangeFilter.py (original)
+++ lucene/pylucene/trunk/test/test_TermRangeFilter.py Thu Oct 15 05:07:36 2009
@@ -12,83 +12,13 @@
 #   limitations under the License.
 # ====================================================================
 
-from random import seed, randint
-from unittest import TestCase, main
-
-from lucene import \
-     SimpleAnalyzer, Document, Field, IndexWriter, RAMDirectory, \
-     IndexReader, IndexSearcher, Term, TermQuery, RangeFilter
-
-
-class BaseTestRangeFilter(TestCase):
-
-    def __init__(self, *args):
-
-        super(BaseTestRangeFilter, self).__init__(*args)
-
-        self.index = RAMDirectory()
-
-        self.MAX_INT = 0x7fffffff
-        self.maxR = ~self.MAX_INT
-        self.minR = self.MAX_INT
-    
-        self.minId = 0
-        self.maxId = 10000
-
-        self.build()
-
-    #
-    # a simple padding function that should work with any int
-    #
-
-    def pad(self, n):
-
-        if n &lt; 0:
-            return "-%0.10d" % (self.MAX_INT + n + 1)
-        else:
-            return "0%0.10d" % n
-
-    def build(self):
-
-        # build an index
-        writer = IndexWriter(self.index, SimpleAnalyzer(), True,
-                             IndexWriter.MaxFieldLength.LIMITED)
-
-        seed(101)
-        for d in xrange(self.minId, self.maxId + 1):
-            doc = Document()
-            doc.add(Field("id", self.pad(d),
-                          Field.Store.YES, Field.Index.NOT_ANALYZED))
-            r = randint(~self.MAX_INT, self.MAX_INT)
-            if self.maxR &lt; r:
-                self.maxR = r
-            if r &lt; self.minR:
-                self.minR = r
-            doc.add(Field("rand", self.pad(r),
-                          Field.Store.YES, Field.Index.NOT_ANALYZED))
-            doc.add(Field("body", "body",
-                          Field.Store.YES, Field.Index.NOT_ANALYZED))
-            writer.addDocument(doc)
-            
-        writer.optimize()
-        writer.close()
-
-    def testPad(self):
-
-        tests = [-9999999, -99560, -100, -3, -1, 0, 3, 9, 10, 1000, 999999999]
-
-        for i in xrange(0, len(tests) - 1):
-            a = tests[i]
-            b = tests[i + 1]
-            aa = self.pad(a)
-            bb = self.pad(b)
-            label = "%s:%s vs %s:%s" %(a, aa, b, bb)
-            self.assertEqual(len(aa), len(bb), "length of %s" %label)
-            self.assert_(aa &lt; bb, "compare less than %s" %label)
+from unittest import main
+from BaseTestRangeFilter import BaseTestRangeFilter
 
+from lucene import *
 
  #
- # A basic 'positive' Unit test class for the RangeFilter class.
+ # A basic 'positive' Unit test class for the TermRangeFilter class.
  #
  # NOTE: at the moment, this class only tests for 'positive' results,
  # it does not verify the results to ensure there are no 'false positives',
@@ -96,11 +26,12 @@
  # that garbage in results in an Exception.
  #
 
-class TestRangeFilter(BaseTestRangeFilter):
+class TestTermRangeFilter(BaseTestRangeFilter):
 
     def testRangeFilterId(self):
 
-        reader = IndexReader.open(self.index, True);
+        index = self.signedIndex
+        reader = IndexReader.open(index.index, True);
         search = IndexSearcher(reader)
 
         medId = ((self.maxId - self.minId) / 2)
@@ -117,94 +48,196 @@
 
         # test id, bounded on both ends
         
-        result = search.search(q, RangeFilter("id", minIP, maxIP,
-                                              True, True), 50)
+        result = search.search(q, TermRangeFilter("id", minIP, maxIP,
+                                                  True, True), 50)
         self.assertEqual(numDocs, result.totalHits, "find all")
 
-        result = search.search(q, RangeFilter("id", minIP, maxIP,
-                                              True, False), 50)
+        result = search.search(q, TermRangeFilter("id", minIP, maxIP,
+                                                  True, False), 50)
         self.assertEqual(numDocs - 1, result.totalHits, "all but last")
 
-        result = search.search(q, RangeFilter("id", minIP, maxIP,
-                                              False, True), 50)
+        result = search.search(q, TermRangeFilter("id", minIP, maxIP,
+                                                  False, True), 50)
         self.assertEqual(numDocs - 1, result.totalHits, "all but first")
         
-        result = search.search(q, RangeFilter("id", minIP, maxIP,
-                                              False, False), 50)
+        result = search.search(q, TermRangeFilter("id", minIP, maxIP,
+                                                  False, False), 50)
         self.assertEqual(numDocs - 2, result.totalHits, "all but ends")
-    
-        result = search.search(q, RangeFilter("id", medIP, maxIP,
-                                              True, True), 50)
+        
+        result = search.search(q, TermRangeFilter("id", medIP, maxIP,
+                                                  True, True), 50)
         self.assertEqual(1 + self.maxId - medId, result.totalHits, "med and up")
         
-        result = search.search(q, RangeFilter("id", minIP, medIP,
-                                              True, True), 50)
+        result = search.search(q, TermRangeFilter("id", minIP, medIP,
+                                                  True, True), 50)
         self.assertEqual(1 + medId - self.minId, result.totalHits, "up to med")
 
         # unbounded id
 
-        result = search.search(q, RangeFilter("id", minIP, None,
-                                              True, False), 50)
+        result = search.search(q, TermRangeFilter("id", minIP, None,
+                                                  True, False), 50)
         self.assertEqual(numDocs, result.totalHits, "min and up")
-
-        result = search.search(q, RangeFilter("id", None, maxIP,
-                                              False, True), 50)
+        
+        result = search.search(q, TermRangeFilter("id", None, maxIP,
+                                                  False, True), 50)
         self.assertEqual(numDocs, result.totalHits, "max and down")
-
-        result = search.search(q, RangeFilter("id", minIP, None,
-                                              False, False), 50)
+        
+        result = search.search(q, TermRangeFilter("id", minIP, None,
+                                                  False, False), 50)
         self.assertEqual(numDocs - 1, result.totalHits, "not min, but up")
         
-        result = search.search(q, RangeFilter("id", None, maxIP,
-                                              False, False), 50)
+        result = search.search(q, TermRangeFilter("id", None, maxIP,
+                                                  False, False), 50)
         self.assertEqual(numDocs - 1, result.totalHits, "not max, but down")
         
-        result = search.search(q, RangeFilter("id",medIP, maxIP,
-                                              True, False), 50)
+        result = search.search(q, TermRangeFilter("id",medIP, maxIP,
+                                                  True, False), 50)
         self.assertEqual(self.maxId - medId, result.totalHits, "med and up, not max")
         
-        result = search.search(q, RangeFilter("id", minIP, medIP,
-                                              False, True), 50)
+        result = search.search(q, TermRangeFilter("id", minIP, medIP,
+                                                  False, True), 50)
         self.assertEqual(medId - self.minId, result.totalHits, "not min, up to med")
 
         # very small sets
 
-        result = search.search(q, RangeFilter("id", minIP, minIP,
-                                              False, False), 50)
+        result = search.search(q, TermRangeFilter("id", minIP, minIP,
+                                                  False, False), 50)
         self.assertEqual(0, result.totalHits, "min, min, False, False")
-
-        result = search.search(q, RangeFilter("id", medIP, medIP,
-                                              False, False), 50)
+        
+        result = search.search(q, TermRangeFilter("id", medIP, medIP,
+                                                  False, False), 50)
         self.assertEqual(0, result.totalHits, "med, med, False, False")
-        result = search.search(q, RangeFilter("id", maxIP, maxIP,
-                                              False, False), 50)
+        result = search.search(q, TermRangeFilter("id", maxIP, maxIP,
+                                                  False, False), 50)
         self.assertEqual(0, result.totalHits, "max, max, False, False")
-                     
-        result = search.search(q, RangeFilter("id", minIP, minIP,
-                                              True, True), 50)
+        
+        result = search.search(q, TermRangeFilter("id", minIP, minIP,
+                                                  True, True), 50)
         self.assertEqual(1, result.totalHits, "min, min, True, True")
-        result = search.search(q, RangeFilter("id", None, minIP,
-                                              False, True), 50)
+        result = search.search(q, TermRangeFilter("id", None, minIP,
+                                                  False, True), 50)
         self.assertEqual(1, result.totalHits, "nul, min, False, True")
-
-        result = search.search(q, RangeFilter("id", maxIP, maxIP,
-                                              True, True), 50)
+        
+        result = search.search(q, TermRangeFilter("id", maxIP, maxIP,
+                                                  True, True), 50)
         self.assertEqual(1, result.totalHits, "max, max, True, True")
-        result = search.search(q, RangeFilter("id", maxIP, None,
-                                              True, False), 50)
+        result = search.search(q, TermRangeFilter("id", maxIP, None,
+                                                  True, False), 50)
         self.assertEqual(1, result.totalHits, "max, nul, True, True")
-
-        result = search.search(q, RangeFilter("id", medIP, medIP,
-                                              True, True), 50)
+        
+        result = search.search(q, TermRangeFilter("id", medIP, medIP,
+                                                  True, True), 50)
         self.assertEqual(1, result.totalHits, "med, med, True, True")
+        
+    def testRangeFilterIdCollating(self):
+
+        index = self.signedIndex
+        reader = IndexReader.open(index.index, True)
+        search = IndexSearcher(reader)
+
+        c = Collator.getInstance(Locale.ENGLISH)
+
+        medId = ((self.maxId - self.minId) / 2)
+
+        minIP = self.pad(self.minId)
+        maxIP = self.pad(self.maxId)
+        medIP = self.pad(medId)
+
+        numDocs = reader.numDocs()
+
+        self.assertEqual(numDocs, 1 + self.maxId - self.minId, "num of docs")
+
+        q = TermQuery(Term("body", "body"))
+
+        # test id, bounded on both ends
+        numHits = search.search(q, TermRangeFilter("id", minIP, maxIP,
+                                                   True, True, c), 1000).totalHits
+        self.assertEqual(numDocs, numHits, "find all")
+
+        numHits = search.search(q, TermRangeFilter("id", minIP, maxIP,
+                                                   True, False, c), 1000).totalHits
+        self.assertEqual(numDocs - 1, numHits, "all but last")
+
+        numHits = search.search(q, TermRangeFilter("id", minIP, maxIP,
+                                                   False, True, c), 1000).totalHits
+        self.assertEqual(numDocs - 1, numHits, "all but first")
+
+        numHits = search.search(q, TermRangeFilter("id", minIP, maxIP,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(numDocs - 2, numHits, "all but ends")
+
+        numHits = search.search(q, TermRangeFilter("id", medIP, maxIP,
+                                                   True, True, c),  1000).totalHits
+        self.assertEqual(1 + self.maxId - medId,  numHits, "med and up")
+
+        numHits = search.search(q, TermRangeFilter("id", minIP, medIP,
+                                                   True, True, c), 1000).totalHits
+        self.assertEqual(1 + medId - self.minId, numHits, "up to med")
+
+        # unbounded id
+
+        numHits = search.search(q, TermRangeFilter("id", minIP, None,
+                                                   True, False, c), 1000).totalHits
+        self.assertEqual(numDocs, numHits, "min and up")
+
+        numHits = search.search(q, TermRangeFilter("id", None, maxIP,
+                                                   False, True, c), 1000).totalHits
+        self.assertEqual(numDocs, numHits, "max and down")
+
+        numHits = search.search(q, TermRangeFilter("id", minIP, None,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(numDocs - 1, numHits, "not min, but up")
+
+        numHits = search.search(q, TermRangeFilter("id", None, maxIP,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(numDocs - 1, numHits, "not max, but down")
+
+        numHits = search.search(q, TermRangeFilter("id", medIP, maxIP,
+                                                   True, False, c), 1000).totalHits
+        self.assertEqual(self.maxId - medId, numHits, "med and up, not max")
+
+        numHits = search.search(q, TermRangeFilter("id", minIP, medIP,
+                                                   False, True, c), 1000).totalHits
+        self.assertEqual(medId - self.minId, numHits, "not min, up to med")
+
+        # very small sets
+
+        numHits = search.search(q, TermRangeFilter("id", minIP, minIP,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(0, numHits, "min, min, F, F")
+        numHits = search.search(q, TermRangeFilter("id", medIP, medIP,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(0, numHits, "med, med, F, F")
+        numHits = search.search(q, TermRangeFilter("id", maxIP, maxIP,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(0, numHits, "max, max, F, F")
+
+        numHits = search.search(q, TermRangeFilter("id", minIP, minIP,
+                                                   True, True, c), 1000).totalHits
+        self.assertEqual(1, numHits, "min, min, T, T")
+        numHits = search.search(q, TermRangeFilter("id", None, minIP,
+                                                   False, True, c), 1000).totalHits
+        self.assertEqual(1, numHits, "nul, min, F, T")
+
+        numHits = search.search(q, TermRangeFilter("id", maxIP, maxIP,
+                                                   True, True, c), 1000).totalHits
+        self.assertEqual(1, numHits, "max, max, T, T")
+        numHits = search.search(q, TermRangeFilter("id", maxIP, None,
+                                                   True, False, c), 1000).totalHits
+        self.assertEqual(1, numHits, "max, nul, T, T")
+
+        numHits = search.search(q, TermRangeFilter("id", medIP, medIP,
+                                                   True, True, c), 1000).totalHits
+        self.assertEqual(1, numHits, "med, med, T, T")
 
     def testRangeFilterRand(self):
 
-        reader = IndexReader.open(self.index, True)
+        index = self.signedIndex
+        reader = IndexReader.open(index.index, True)
         search = IndexSearcher(reader)
 
-        minRP = self.pad(self.minR)
-        maxRP = self.pad(self.maxR)
+        minRP = self.pad(index.minR)
+        maxRP = self.pad(index.maxR)
 
         numDocs = reader.numDocs()
         
@@ -214,66 +247,220 @@
 
         # test extremes, bounded on both ends
         
-        result = search.search(q, RangeFilter("rand", minRP, maxRP,
-                                              True, True), 50)
+        result = search.search(q, TermRangeFilter("rand", minRP, maxRP, 
+                                                  True, True), 50)
         self.assertEqual(numDocs, result.totalHits, "find all")
 
-        result = search.search(q, RangeFilter("rand", minRP, maxRP,
-                                              True, False), 50)
+        result = search.search(q, TermRangeFilter("rand", minRP, maxRP, 
+                                                  True, False), 50)
         self.assertEqual(numDocs - 1, result.totalHits, "all but biggest")
 
-        result = search.search(q, RangeFilter("rand", minRP, maxRP,
-                                              False, True), 50)
+        result = search.search(q, TermRangeFilter("rand", minRP, maxRP, 
+                                                  False, True), 50)
         self.assertEqual(numDocs - 1, result.totalHits, "all but smallest")
         
-        result = search.search(q, RangeFilter("rand", minRP, maxRP,
-                                              False, False), 50)
+        result = search.search(q, TermRangeFilter("rand", minRP, maxRP, 
+                                                  False, False), 50)
         self.assertEqual(numDocs - 2, result.totalHits, "all but extremes")
     
         # unbounded
 
-        result = search.search(q, RangeFilter("rand", minRP, None,
-                                              True, False), 50)
+        result = search.search(q, TermRangeFilter("rand", minRP, None, 
+                                                  True, False), 50)
         self.assertEqual(numDocs, result.totalHits, "smallest and up")
 
-        result = search.search(q, RangeFilter("rand", None, maxRP,
-                                              False, True), 50)
+        result = search.search(q, TermRangeFilter("rand", None, maxRP, 
+                                                  False, True), 50)
         self.assertEqual(numDocs, result.totalHits, "biggest and down")
 
-        result = search.search(q, RangeFilter("rand", minRP, None,
-                                              False, False), 50)
+        result = search.search(q, TermRangeFilter("rand", minRP, None, 
+                                                  False, False), 50)
         self.assertEqual(numDocs - 1, result.totalHits, "not smallest, but up")
         
-        result = search.search(q, RangeFilter("rand", None, maxRP,
-                                              False, False), 50)
+        result = search.search(q, TermRangeFilter("rand", None, maxRP, 
+                                                  False, False), 50)
         self.assertEqual(numDocs - 1, result.totalHits, "not biggest, but down")
         
         # very small sets
 
-        result = search.search(q, RangeFilter("rand", minRP, minRP,
-                                              False, False), 50)
+        result = search.search(q, TermRangeFilter("rand", minRP, minRP, 
+                                                  False, False), 50)
         self.assertEqual(0, result.totalHits, "min, min, False, False")
 
-        result = search.search(q, RangeFilter("rand", maxRP, maxRP,
-                                              False, False), 50)
+        result = search.search(q, TermRangeFilter("rand", maxRP, maxRP, 
+                                                  False, False), 50)
         self.assertEqual(0, result.totalHits, "max, max, False, False")
                      
-        result = search.search(q, RangeFilter("rand", minRP, minRP,
-                                              True, True), 50)
+        result = search.search(q, TermRangeFilter("rand", minRP, minRP, 
+                                                  True, True), 50)
         self.assertEqual(1, result.totalHits, "min, min, True, True")
 
-        result = search.search(q, RangeFilter("rand", None, minRP,
-                                              False, True), 50)
+        result = search.search(q, TermRangeFilter("rand", None, minRP, 
+                                                  False, True), 50)
         self.assertEqual(1, result.totalHits, "nul, min, False, True")
 
-        result = search.search(q, RangeFilter("rand", maxRP, maxRP,
-                                              True, True), 50)
+        result = search.search(q, TermRangeFilter("rand", maxRP, maxRP, 
+                                                  True, True), 50)
         self.assertEqual(1, result.totalHits, "max, max, True, True")
 
-        result = search.search(q, RangeFilter("rand", maxRP, None,
-                                              True, False), 50)
+        result = search.search(q, TermRangeFilter("rand", maxRP, None, 
+                                                  True, False), 50)
         self.assertEqual(1, result.totalHits, "max, nul, True, True")
 
+    def testRangeFilterRandCollating(self):
+
+        # using the unsigned index because collation seems to ignore hyphens
+        index = self.unsignedIndex
+        reader = IndexReader.open(index.index, True)
+        search = IndexSearcher(reader)
+
+        c = Collator.getInstance(Locale.ENGLISH)
+
+        minRP = self.pad(index.minR)
+        maxRP = self.pad(index.maxR)
+
+        numDocs = reader.numDocs()
+
+        self.assertEqual(numDocs, 1 + self.maxId - self.minId, "num of docs")
+
+        q = TermQuery(Term("body", "body"))
+
+        # test extremes, bounded on both ends
+
+        numHits = search.search(q, TermRangeFilter("rand", minRP, maxRP,
+                                                   True, True, c), 1000).totalHits
+        self.assertEqual(numDocs, numHits, "find all")
+
+        numHits = search.search(q, TermRangeFilter("rand", minRP, maxRP,
+                                                   True, False, c), 1000).totalHits
+        self.assertEqual(numDocs - 1, numHits, "all but biggest")
+
+        numHits = search.search(q, TermRangeFilter("rand", minRP, maxRP,
+                                                   False, True, c), 1000).totalHits
+        self.assertEqual(numDocs - 1, numHits, "all but smallest")
+
+        numHits = search.search(q, TermRangeFilter("rand", minRP, maxRP,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(numDocs - 2, numHits, "all but extremes")
+
+        # unbounded
+
+        numHits = search.search(q, TermRangeFilter("rand", minRP, None,
+                                                   True, False, c), 1000).totalHits
+        self.assertEqual(numDocs, numHits, "smallest and up")
+
+        numHits = search.search(q, TermRangeFilter("rand", None, maxRP,
+                                                   False, True, c), 1000).totalHits
+        self.assertEqual(numDocs, numHits, "biggest and down")
+
+        numHits = search.search(q, TermRangeFilter("rand", minRP, None,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(numDocs - 1, numHits, "not smallest, but up")
+
+        numHits = search.search(q, TermRangeFilter("rand", None, maxRP,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(numDocs - 1, numHits, "not biggest, but down")
+
+        # very small sets
+
+        numHits = search.search(q, TermRangeFilter("rand", minRP, minRP,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(0, numHits, "min, min, F, F")
+
+        numHits = search.search(q, TermRangeFilter("rand", maxRP, maxRP,
+                                                   False, False, c), 1000).totalHits
+        self.assertEqual(0, numHits, "max, max, F, F")
+
+        numHits = search.search(q, TermRangeFilter("rand", minRP, minRP,
+                                                   True, True, c), 1000).totalHits
+        self.assertEqual(1, numHits, "min, min, T, T")
+
+        numHits = search.search(q, TermRangeFilter("rand", None, minRP,
+                                                   False, True, c), 1000).totalHits
+        self.assertEqual(1, numHits, "nul, min, F, T")
+
+        numHits = search.search(q, TermRangeFilter("rand", maxRP, maxRP,
+                                                   True, True, c), 1000).totalHits
+        self.assertEqual(1, numHits, "max, max, T, T")
+        numHits = search.search(q, TermRangeFilter("rand", maxRP, None,
+                                                   True, False, c), 1000).totalHits
+        self.assertEqual(1, numHits, "max, nul, T, T")
+
+    def testFarsi(self):
+            
+        # build an index
+        farsiIndex = RAMDirectory()
+        writer = IndexWriter(farsiIndex, SimpleAnalyzer(), True, 
+                             IndexWriter.MaxFieldLength.LIMITED)
+        doc = Document()
+        doc.add(Field("content", u"\u0633\u0627\u0628", 
+                      Field.Store.YES, Field.Index.NOT_ANALYZED))
+        doc.add(Field("body", "body",
+                      Field.Store.YES, Field.Index.NOT_ANALYZED))
+        writer.addDocument(doc)
+            
+        writer.optimize()
+        writer.close()
+
+        reader = IndexReader.open(farsiIndex, True)
+        search = IndexSearcher(reader)
+        q = TermQuery(Term("body", "body"))
+
+        # Neither Java 1.4.2 nor 1.5.0 has Farsi Locale collation available in
+        # RuleBasedCollator.  However, the Arabic Locale seems to order the
+        # Farsi characters properly.
+        collator = Collator.getInstance(Locale("ar"))
+        
+        # Unicode order would include U+0633 in [ U+062F - U+0698 ], but Farsi
+        # orders the U+0698 character before the U+0633 character, so the
+        # single index Term below should NOT be returned by a
+        # TermRangeFilter with a Farsi Collator (or an Arabic one for the
+        # case when Farsi is not supported).
+        numHits = search.search(q, TermRangeFilter("content", u"\u062F", u"\u0698", True, True, collator), 1000).totalHits
+        self.assertEqual(0, numHits, "The index Term should not be included.")
+
+        numHits = search.search(q, TermRangeFilter("content", u"\u0633", u"\u0638", True, True, collator), 1000).totalHits
+        self.assertEqual(1, numHits, "The index Term should be included.")
+        search.close()
+
+    def testDanish(self):
+            
+        # build an index
+        danishIndex = RAMDirectory()
+        writer = IndexWriter(danishIndex, SimpleAnalyzer(), True,
+                             IndexWriter.MaxFieldLength.LIMITED)
+
+        # Danish collation orders the words below in the given order
+        # (example taken from TestSort.testInternationalSort() ).
+        words = [u"H\u00D8T", u"H\u00C5T", "MAND"]
+        for word in words:
+            doc = Document()
+            doc.add(Field("content", word, Field.Store.YES,
+                          Field.Index.NOT_ANALYZED))
+            doc.add(Field("body", "body", Field.Store.YES,
+                          Field.Index.NOT_ANALYZED))
+            writer.addDocument(doc)
+
+        writer.optimize()
+        writer.close()
+
+        reader = IndexReader.open(danishIndex, True)
+        search = IndexSearcher(reader)
+        q = TermQuery(Term("body", "body"))
+
+        collator = Collator.getInstance(Locale("da", "dk"))
+        query = TermRangeQuery("content", "H\u00D8T", "MAND", False, False,
+                               collator)
+
+        # Unicode order would not include "H\u00C5T" in [ "H\u00D8T", "MAND" ],
+        # but Danish collation does.
+        numHits = search.search(q, TermRangeFilter("content", u"H\u00D8T", "MAND", False, False, collator), 1000).totalHits
+        self.assertEqual(1, numHits, "The index Term should be included.")
+
+        numHits = search.search(q, TermRangeFilter("content", u"H\u00C5T", "MAND", False, False, collator), 1000).totalHits
+        self.assertEqual(0, numHits, "The index Term should not be included.")
+        search.close()
+
 
 if __name__ == "__main__":
     import sys, lucene
@@ -282,8 +469,8 @@
         sys.argv.remove('-loop')
         while True:
             try:
-                main(defaultTest='TestRangeFilter')
+                main(defaultTest='TestTermRangeFilter')
             except:
                 pass
     else:
-        main(defaultTest='TestRangeFilter')
+        main(defaultTest='TestTermRangeFilter')

Copied: lucene/pylucene/trunk/test/test_TermRangeQuery.py (from r824626, lucene/pylucene/trunk/test/test_RangeQuery.py)
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_TermRangeQuery.py?p2=lucene/pylucene/trunk/test/test_TermRangeQuery.py&amp;p1=lucene/pylucene/trunk/test/test_RangeQuery.py&amp;r1=824626&amp;r2=825394&amp;rev=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_RangeQuery.py (original)
+++ lucene/pylucene/trunk/test/test_TermRangeQuery.py Thu Oct 15 05:07:36 2009
@@ -16,7 +16,7 @@
 from lucene import *
 
 
-class RangeQueryTestCase(TestCase):
+class TermRangeQueryTestCase(TestCase):
     """
     Unit tests ported from Java Lucene
     """
@@ -55,9 +55,8 @@
 
     def testExclusive(self):
 
-        query = RangeQuery(Term("content", "A"),
-                           Term("content", "C"),
-                           False)
+        query = TermRangeQuery("content", "A", "C", False, False)
+
         self._initializeIndex(["A", "B", "C", "D"])
         searcher = IndexSearcher(self.dir, True)
         topDocs = searcher.search(query, 50)
@@ -81,9 +80,7 @@
 
     def testInclusive(self):
 
-        query = RangeQuery(Term("content", "A"),
-                           Term("content", "C"),
-                           True)
+        query = TermRangeQuery("content", "A", "C", True, True)
 
         self._initializeIndex(["A", "B", "C", "D"])
         searcher = IndexSearcher(self.dir, True)

Modified: lucene/pylucene/trunk/test/test_bug1763.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_bug1763.py?rev=825394&amp;r1=825393&amp;r2=825394&amp;view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_bug1763.py (original)
+++ lucene/pylucene/trunk/test/test_bug1763.py Thu Oct 15 05:07:36 2009
@@ -48,7 +48,7 @@
             
         w1 = IndexWriter(self.d1, self.analyzer, True,
                          IndexWriter.MaxFieldLength.LIMITED)
-        w1.addIndexes([self.d2])
+        w1.addIndexes([IndexReader.open(self.d2, True)])
         w1.optimize()
         w1.close()
 




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825389 - in /lucene/site: publish/ publish/skin/images/ src/documentation/content/xdocs/</title>
<author><name>mattmann@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091015044042.363B123888D1@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091015044042-363B123888D1@eris-apache-org%3e</id>
<updated>2009-10-15T04:40:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: mattmann
Date: Thu Oct 15 04:40:41 2009
New Revision: 825389

URL: http://svn.apache.org/viewvc?rev=825389&amp;view=rev
Log:
Add Chris Mattmann to Lucene PMC per http://www.gossamer-threads.com/lists/lucene/general/86255?page=last
-- Thanks, Guys!

Modified:
    lucene/site/publish/skin/images/rc-b-l-15-1body-2menu-3menu.png
    lucene/site/publish/skin/images/rc-b-r-15-1body-2menu-3menu.png
    lucene/site/publish/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
    lucene/site/publish/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
    lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
    lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
    lucene/site/publish/skin/images/rc-t-r-15-1body-2menu-3menu.png
    lucene/site/publish/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
    lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
    lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
    lucene/site/publish/who.html
    lucene/site/publish/who.pdf
    lucene/site/src/documentation/content/xdocs/who.xml

Modified: lucene/site/publish/skin/images/rc-b-l-15-1body-2menu-3menu.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-b-l-15-1body-2menu-3menu.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-b-r-15-1body-2menu-3menu.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-b-r-15-1body-2menu-3menu.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-r-15-1body-2menu-3menu.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-r-15-1body-2menu-3menu.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
URL: http://svn.apache.org/viewvc/lucene/site/publish/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/publish/who.html
URL: http://svn.apache.org/viewvc/lucene/site/publish/who.html?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
--- lucene/site/publish/who.html (original)
+++ lucene/site/publish/who.html Thu Oct 15 04:40:41 2009
@@ -276,6 +276,8 @@
         
 &lt;li&gt;Dennis Kubes &amp;lt;kubes&amp;gt; &lt;/li&gt;
         
+&lt;li&gt;Chris A. Mattmann &amp;lt;mattmann&amp;gt; &lt;/li&gt;
+        
 &lt;li&gt;Mike McCandless &amp;lt;mikemccand&amp;gt; &lt;/li&gt;
         
 &lt;li&gt;Ryan McKinley &amp;lt;ryan&amp;gt; &lt;/li&gt;
@@ -293,7 +295,7 @@
 &lt;li&gt;Jukka Zitting &amp;lt;jukka&amp;gt; &lt;/li&gt;
         
 &lt;/ul&gt;
-&lt;a name="N10069"&gt;&lt;/a&gt;&lt;a name="Emeritus+PMC+Members"&gt;&lt;/a&gt;
+&lt;a name="N1006C"&gt;&lt;/a&gt;&lt;a name="Emeritus+PMC+Members"&gt;&lt;/a&gt;
 &lt;h3 class="h4"&gt;Emeritus PMC Members&lt;/h3&gt;
 &lt;ul&gt;
         
@@ -303,7 +305,7 @@
 &lt;/div&gt;
 
     
-&lt;a name="N10077"&gt;&lt;/a&gt;&lt;a name="Lucene+Committers"&gt;&lt;/a&gt;
+&lt;a name="N1007A"&gt;&lt;/a&gt;&lt;a name="Lucene+Committers"&gt;&lt;/a&gt;
 &lt;h2 class="h3"&gt;Lucene Committers&lt;/h2&gt;
 &lt;div class="section"&gt;
 &lt;p&gt;
@@ -313,7 +315,7 @@
 &lt;/div&gt;
 
     
-&lt;a name="N10081"&gt;&lt;/a&gt;&lt;a name="Lucene+PMC+Guide"&gt;&lt;/a&gt;
+&lt;a name="N10084"&gt;&lt;/a&gt;&lt;a name="Lucene+PMC+Guide"&gt;&lt;/a&gt;
 &lt;h2 class="h3"&gt;Lucene PMC Guide&lt;/h2&gt;
 &lt;div class="section"&gt;
 &lt;p&gt;Here we document any specific processes or rules that the Lucene PMC has adopted.

Modified: lucene/site/publish/who.pdf
URL: http://svn.apache.org/viewvc/lucene/site/publish/who.pdf?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/site/src/documentation/content/xdocs/who.xml
URL: http://svn.apache.org/viewvc/lucene/site/src/documentation/content/xdocs/who.xml?rev=825389&amp;r1=825388&amp;r2=825389&amp;view=diff
==============================================================================
--- lucene/site/src/documentation/content/xdocs/who.xml (original)
+++ lucene/site/src/documentation/content/xdocs/who.xml Thu Oct 15 04:40:41 2009
@@ -52,6 +52,7 @@
         &lt;li&gt;Grant Ingersoll &amp;lt;gsingers&amp;gt; &lt;/li&gt;
         &lt;li&gt;Mike Klaas &amp;lt;klaas&amp;gt; &lt;/li&gt;
         &lt;li&gt;Dennis Kubes &amp;lt;kubes&amp;gt; &lt;/li&gt;
+        &lt;li&gt;Chris A. Mattmann &amp;lt;mattmann&amp;gt; &lt;/li&gt;
         &lt;li&gt;Mike McCandless &amp;lt;mikemccand&amp;gt; &lt;/li&gt;
         &lt;li&gt;Ryan McKinley &amp;lt;ryan&amp;gt; &lt;/li&gt;
         &lt;li&gt;Daniel Naber &amp;lt;dnaber&amp;gt; &lt;/li&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r824928 - in /lucene/pylucene/site: forrest.properties src/documentation/content/xdocs/documentation/readme.xml src/documentation/content/xdocs/index.xml src/documentation/content/xdocs/jcc/documentation/readme.xml</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091013211012.8EFA523888BD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091013211012-8EFA523888BD@eris-apache-org%3e</id>
<updated>2009-10-13T21:10:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Tue Oct 13 21:10:11 2009
New Revision: 824928

URL: http://svn.apache.org/viewvc?rev=824928&amp;view=rev
Log:
updated for release 2.9.0

Modified:
    lucene/pylucene/site/forrest.properties
    lucene/pylucene/site/src/documentation/content/xdocs/documentation/readme.xml
    lucene/pylucene/site/src/documentation/content/xdocs/index.xml
    lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml

Modified: lucene/pylucene/site/forrest.properties
URL: http://svn.apache.org/viewvc/lucene/pylucene/site/forrest.properties?rev=824928&amp;r1=824927&amp;r2=824928&amp;view=diff
==============================================================================
--- lucene/pylucene/site/forrest.properties (original)
+++ lucene/pylucene/site/forrest.properties Tue Oct 13 21:10:11 2009
@@ -85,10 +85,10 @@
 #forrest.validate=true
 #forrest.validate.xdocs=${forrest.validate}
 #forrest.validate.skinconf=${forrest.validate}
-#forrest.validate.sitemap=${forrest.validate}
-#forrest.validate.stylesheets=${forrest.validate}
-#forrest.validate.skins=${forrest.validate}
-#forrest.validate.skins.stylesheets=${forrest.validate.skins}
+forrest.validate.sitemap=false
+forrest.validate.stylesheets=false
+forrest.validate.skins=false
+forrest.validate.skins.stylesheets=false
 
 # *.failonerror=(true|false) - stop when an XML file is invalid
 #forrest.validate.failonerror=true

Modified: lucene/pylucene/site/src/documentation/content/xdocs/documentation/readme.xml
URL: http://svn.apache.org/viewvc/lucene/pylucene/site/src/documentation/content/xdocs/documentation/readme.xml?rev=824928&amp;r1=824927&amp;r2=824928&amp;view=diff
==============================================================================
--- lucene/pylucene/site/src/documentation/content/xdocs/documentation/readme.xml (original)
+++ lucene/pylucene/site/src/documentation/content/xdocs/documentation/readme.xml Tue Oct
13 21:10:11 2009
@@ -152,7 +152,7 @@
           is optional and defaults to Object. 
         &lt;/p&gt;
         &lt;p&gt;
-          To convert a char or byte array to a Python string use a 
+          To convert a char array to a Python string use a 
           &lt;code&gt;''.join(array)&lt;/code&gt; construct.
         &lt;/p&gt;
         &lt;p&gt;
@@ -263,7 +263,7 @@
             Document instances can be iterated over for their fields.&lt;br/&gt;
             The Java loop:
             &lt;source&gt;
-              Enumeration fields = doc.fields();
+              Enumeration fields = doc.getFields();
               while (fields.hasMoreElements()) {
                   Field field = (Field) fields.nextElement();
                   ...
@@ -275,7 +275,7 @@
                   field = Field.cast_(field)
                   ...
             &lt;/source&gt;
-            Once JCC heeds Java 1.5 annotations and once Java Lucene
+            Once JCC heeds Java 1.5 type parameters and once Java Lucene
             makes use of them, such casting should become unncessary.
           &lt;/li&gt;
         &lt;/ul&gt;

Modified: lucene/pylucene/site/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/lucene/pylucene/site/src/documentation/content/xdocs/index.xml?rev=824928&amp;r1=824927&amp;r2=824928&amp;view=diff
==============================================================================
--- lucene/pylucene/site/src/documentation/content/xdocs/index.xml (original)
+++ lucene/pylucene/site/src/documentation/content/xdocs/index.xml Tue Oct 13 21:10:11 2009
@@ -29,7 +29,7 @@
 	Java &lt;a href="http://lucene.apache.org/java/"&gt;Lucene&lt;/a&gt;. Its goal
 	is to allow you to use Lucene's text indexing and searching
 	capabilities from Python. It is API compatible with the latest
-	version of Java Lucene, version 2.4.1 as of April 3rd, 2009.
+	version of Java Lucene, version 2.9.0 as of October 13th, 2009.
       &lt;/p&gt;
       &lt;p&gt;
 	PyLucene is not a Lucene port but a Python wrapper around
@@ -74,6 +74,18 @@
     &lt;/section&gt;
     &lt;section id="news"&gt;
       &lt;title&gt;News&lt;/title&gt;
+      &lt;section id="news20091013"&gt;
+	&lt;title&gt;13 Oct 2009 - PyLucene 2.9.0-1 available&lt;/title&gt;
+	&lt;p&gt;
+	  This release tracks Lucene Java's recent 2.9.0 &lt;a href="http://lucene.apache.org/java/docs/index.html#25+September+2009+-+Lucene+Java+2.9.0+available"&gt;release&lt;/a&gt;.
+	&lt;/p&gt;
+	&lt;p&gt;
+	  See &lt;a href="http://svn.apache.org/repos/asf/lucene/pylucene/tags/pylucene_2_9_0/CHANGES"&gt;PyLucene
CHANGES&lt;/a&gt; and &lt;a href="http://svn.apache.org/repos/asf/lucene/pylucene/tags/pylucene_2_9_0/jcc/CHANGES"&gt;JCC
CHANGES&lt;/a&gt; for details.
+	&lt;/p&gt;
+	&lt;p&gt;
+	  A source distribution is available &lt;a href="http://www.apache.org/dyn/closer.cgi/lucene/pylucene/"&gt;here&lt;/a&gt;.
+	&lt;/p&gt;
+      &lt;/section&gt;
       &lt;section id="news20090403"&gt;
 	&lt;title&gt;03 Apr 2009 - PyLucene 2.4.1-1 available&lt;/title&gt;
 	&lt;p&gt;

Modified: lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml
URL: http://svn.apache.org/viewvc/lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml?rev=824928&amp;r1=824927&amp;r2=824928&amp;view=diff
==============================================================================
--- lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml (original)
+++ lucene/pylucene/site/src/documentation/content/xdocs/jcc/documentation/readme.xml Tue
Oct 13 21:10:11 2009
@@ -408,7 +408,7 @@
 	size.
       &lt;/p&gt;
       &lt;p&gt;
-	To convert a char or byte array to a Python string use
+	To convert a char array to a Python string use
 	a &lt;code&gt;''.join(array)&lt;/code&gt; construct.
       &lt;/p&gt;
       &lt;p&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r824926 - /lucene/pylucene/tags/pylucene_2_9_0/</title>
<author><name>vajda@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/lucene-commits/200910.mbox/%3c20091013205914.C03EC23888BD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091013205914-C03EC23888BD@eris-apache-org%3e</id>
<updated>2009-10-13T20:59:14Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vajda
Date: Tue Oct 13 20:59:14 2009
New Revision: 824926

URL: http://svn.apache.org/viewvc?rev=824926&amp;view=rev
Log:
release 2.9.0

Added:
    lucene/pylucene/tags/pylucene_2_9_0/
      - copied from r824925, lucene/pylucene/branches/pylucene_2_9/



</pre>
</div>
</content>
</entry>
</feed>
