Looks like the combination of JCC 2.6 and Lucene 2.9.3 have made some significant API changes. This is what I get with 2.9.3:
% python /u/python/uplib/indexing.py search /local/demo-repo/index picasso [...] hits are <Hits: org.apache.lucene.search.h...@f6f3dc> (0 hits) Traceback (most recent call last): File "/u/python/uplib/indexing.py", line 930, in <module> search(sys.argv[2], sys.argv[3:]) File "/u/python/uplib/indexing.py", line 897, in search print c.search(' '.join(searchterms)) File "/u/python/uplib/indexing.py", line 687, in search for hit in hits: lucene.JavaError: java.lang.IndexOutOfBoundsException: Not a valid hit number: 0 Java stacktrace: java.lang.IndexOutOfBoundsException: Not a valid hit number: 0 at org.apache.lucene.search.Hits.hitDoc(Hits.java:215) at org.apache.lucene.search.Hits.doc(Hits.java:168) In other words, Hits are now something I can take the length of, but cannot enumerate? Have we switched to TopDocs already? % python /u/python/uplib/indexing.py search /local/demo-repo/index Apple [...] hits are <Hits: org.apache.lucene.search.h...@f4b0dc> (12) Traceback (most recent call last): File "/u/python/uplib/indexing.py", line 930, in <module> search(sys.argv[2], sys.argv[3:]) File "/u/python/uplib/indexing.py", line 897, in search print c.search(' '.join(searchterms)) File "/u/python/uplib/indexing.py", line 688, in search doc = Hit.cast_(hit).getDocument() TypeError: Document<stored/uncompressed,indexed<id:01182-38-8512-609> stored/uncompressed,indexed<uplibdate:20070620> stored/uncompressed,indexed<uplibtype:whole> stored/uncompressed,indexed<categories:_(all)_>> % Bill