[pylucene-dev] ArrayIndexOutOfBoundsException with
Field.TermVector.WITH_OFFSETS
Andi Vajda
vajda at osafoundation.org
Fri Aug 18 03:25:54 PDT 2006
On Fri, 18 Aug 2006, Andi Vajda wrote:
>
> On Thu, 17 Aug 2006, Steven Bethard wrote:
>
>> I'm getting ArrayIndexOutOfBoundsExceptions thrown whenever I use
>> Field.TermVector.WITH_OFFSETS, Field.TermVector.WITH_POSITIONS or
>> Field.TermVector.WITH_POSITIONS_OFFSETS, though the errors show up
>> somewhat sporadically. Here's an interactive session where I was able
>> to provoke one:
>
> Given that the error seems to come from inside Java Lucene, it could be
> either:
> - a gcj compilation error: please give us your gcj version and OS details
> (I've had to patch around various such bugs)
> - a Java Lucene bug: see if the same Java program causes the same Java
> Lucene error and if so contact java-user at lucene.apache.org or file a Java
> Lucene bug
>
Indeed, I wasn't able to reproduce the bug on my intel mac os x system.
I suspect a gcj compilation error. Are you running on Windows by any chance ?
Andi..
>
>>
>> ----------------------------------------------------------------------
>>>>> import PyLucene as lucene
>>>>> def add_doc(writer, text):
>> doc = lucene.Document()
>> doc.add(lucene.Field('text', text, lucene.Field.Store.YES,
>> lucene.Field.Index.TOKENIZED, lucene.Field.TermVector.WITH_OFFSETS))
>> writer.addDocument(doc)
>>
>>
>>>>> analyzer = lucene.StandardAnalyzer()
>>>>> writer = lucene.IndexWriter('temp', analyzer, True)
>>>>> for _ in xrange(1000):
>> add_doc(writer, '''
>> Mr Straw also called for changes in the application of the Dublin
>> convention. Why?
>>
>> For the past year, Mr Straw has put forward several initiatives to
>> combat "asylum-shopping". This is the practice whereby people whose
>> asylum claim is rejected in one EU country or who fail to lodge a
>> claim in the first port of entry travel further to countries like
>> Britain, where social benefits might be better and the judges more
>> sympathetic.
>>
>> Mr Straw has now called for a reform of the 1997 Dublin Convention
>> that obliges the first EU country entered to process asylum
>> applications, saying that it had not been working as intended.
>>
>> Many countries, Mr Straw suggests, turned a blind eye as
>> asylum-seekers travelled to third countries. He wants to see an end to
>> the current situation, where scores of asylum-seekers are waiting at a
>> Red Cross reception centre near Calais, in France, trying to board
>> trains and trucks to get into Britain.
>>
>> The European Commission is currently looking at the effectiveness of
>> the Dublin Convention and measures are set to be adopted this year in
>> order to limit the movement of asylum-seekers between EU member
>> states.
>> ''')
>>
>>
>> Traceback (most recent call last):
>> File "<pyshell#103>", line 12, in -toplevel-
>> ''')
>> File "<pyshell#99>", line 4, in add_doc
>> writer.addDocument(doc)
>> JavaError: java.lang.ArrayIndexOutOfBoundsException
>> ----------------------------------------------------------------------
>>
>> Can anyone reproduce these errors? I don't get them when using
>> Field.TermVector.YES or Field.TermVector.NO.
>>
>> Steve
>> --
>> I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
>> tiny blip on the distant coast of sanity.
>> --- Bucky Katt, Get Fuzzy
>> _______________________________________________
>> pylucene-dev mailing list
>> pylucene-dev at osafoundation.org
>> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>>
> _______________________________________________
> pylucene-dev mailing list
> pylucene-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>
More information about the pylucene-dev
mailing list