lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Koch <>
Subject Re:
Date Tue, 12 Feb 2013 20:16:56 GMT
Hi Andi,

Thanks to your hints I was now able to build PyLucene4.1 and got further with the
- The imports should be OK now and most of the required changes are done I guess. However
I now reached another problem: I need to instantiate the class 'FacetsCollector' but get an
error when doing so:

  File "samples/", line 222, in searchWithRequestAndQuery
    facetsCollector = FacetsCollector(facetSearchParams, indexReader, taxoReader)
NotImplementedError: ('instantiating java class', <type 'FacetsCollector'>)

The java example has this line:
    FacetsCollector facetsCollector = new FacetsCollector(facetSearchParams, indexReader,
and javadocs state it has a public constructor:,%20org.apache.lucene.index.IndexReader,%20org.apache.lucene.facet.taxonomy.TaxonomyReader)

So what could be the reason for this behavior?

I have another problem with the constructor of FacetSearchParams: it is expecting arguments:
  (List<FacetRequest> facetRequests, FacetIndexingParams indexingParams)
but neither
 FacetSearchParams(Arrays.asList([facetRequest,]), indexingParams)
 FacetSearchParams([facetRequest,], indexingParams)
does it here.  I get

lucene.InvalidArgsError: (<type 'FacetSearchParams'>, '__init__', (<List: [root/a
nRes=10 nLbl=10]>, <FacetIndexingParams: org.apache.lucene.facet.params.FacetIndexingParams@f97ad3c0>))

I thought that JavaList could help, but I cannot import it:
>>> from lucene.collections import JavaList
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/koch/.virtualenvs/pylucene/lib/python2.7/site-packages/lucene-4.1-py2.7-macosx-10.8-x86_64.egg/lucene/",
line 17, in <module>
    from org.apache.pylucene.util import \
ImportError: No module named pylucene.util

That's probably because I had to disable in Makefile
## JARS+=$(HIGHLIGHTER_JAR)        # needs memory contrib
## JARS+=$(EXTENSIONS_JAR)         # needs highlighter contrib

Do you think that's a type cast issue and that JavaList would help here?
I need to define a 'typed' list , e.g. List<FacetRequest> 

FacetSearchParams API docs:

Current version of

Any hints?

Am 12.02.2013 um 09:19 schrieb Andi Vajda <>:

> On Tue, 12 Feb 2013, Andi Vajda wrote:
>> Indeed. I reproduced that error here.
>> A new method was added to the FieldCache.Parser interface.
>> I added it to the classes missing it (rev 1445048).
>> I then found that the test case from hell,, has majorly changed again
and needs to be ported again. Sigh.
> That being said, you should be able to build PyLucene 4.1 again and proceed with
The needed work shouldn't be blocking you.
> Andi..

View raw message