Re: nxlucene / pylucene2 / 64-bit

Jean-Marc Orliaguet <[email protected]> Wed, 11 Apr 2007 16:04:16 +0200
Newsgroups gmane.comp.web.zope.cps.devel
Organization Chalmers
Message-ID <[email protected]>
Julien Anguenot wrote:
> Hi Jean-Marc,
>
>   

Hi Julien,
> Of course, using RedHat or Fedora is always the smartest choice you can
> make regarding PyLucene... You won't get any troubles. Things are lot
> more tricky on Debian based systems...
>
>   
>> BTW, PyLucene-1.9.1 doesn't seem to work on 64-bit architectures
>>     
>
> possible.
>
>   
>> if anyone wants to test ...
>>     
>
> Maybe it's time for a 1.x branch on PyLucene 1.9.x and put your branch
> in the trunk ?
>
> I'm gonna check here if we can test out with some large data to validate
>  your changes.
>
> Cheers,
>
>   

I'm going to test with real data the coming weeks. Eventually it would 
indeed be a good idea to upgrade nxlucene to support pylucene-2.0.0 by 
default.
there is a  "- fixed memory leak with PyLucene.PythonThread instances" 
in the CHANGELOG between 1.9 and 2.0 for instance.

apart from very minor API changes:

- I replaced 'sys.maxint' with int(2**31-1) since on 64-bit systems you 
end up with 9223372036854775807 which java lucene chokes on.
  maybe there is a constant that can be imported from Java. in Jython 
there is  java.lang.Integer.MAX_VALUE which seems to be the value you 
want here.

- a loop in nxlucene/server/core.py breaks on IndexError instead of 
PyLucene.JavaError:

    except PyLucene.JavaError:
       break
+  except IndexError:
+     break

  it seems to be related to:
  "- changed Hits iteration to use Hit object yet work as before (for i, 
doc in..)"

  so I guess a standard 'for' loop can be used here instead.


/JM
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel