Your python example differs from the java example. The java one uses the call that's commented out:
#query = queryParser.parse(queryString) query = queryParser.parse(Version.LUCENE_CURRENT, queryString, fields, [BooleanClause.Occur.SHOULD, BooleanClause.Occur.SHOULD], analyzer) The problem is that the second form is a static method, so settings on the parser object won't affect anything. Try it this way to reproduce the error: query = MultiFieldQueryParser.parse(Version.LUCENE_CURRENT, queryString, fields, [BooleanClause.Occur.SHOULD, BooleanClause.Occur.SHOULD], analyzer) You should see the same behavior in java lucene. On Aug 18, 2010, at 5:21 AM, Christoph Burgmer wrote: > Hi Andy, > > here's a short example in both Java and Python that do the same. The Python > example raises the error as mentioned by Daniel. I've also added a patch to > extend the current test cases to include tests for setAllowLeadingWildcard(). > > -Christoph > <LeadingWildcardExample.java><LeadingWildcardExample.py><leadingwildcard_test.patch>