Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Lucene search engine plugin - now with Java! Code advice appreciated


Go to End


2 Posts   1905 Views

Avatar
Darren Inwood

Community Member, 12 Posts

18 August 2011 at 10:52am

Hi everyone

If anyone wants to have a play, I'm working on a new branch of my Lucene search engine plugin:

http://code.google.com/p/lucene-silverstripe-plugin/source/browse/#svn%2Fbranches%2Fjava-integration

This branch uses the official Apache Lucene java code. It indexes around 50x faster than the current Zend PHP port, and I have it running searches in about 60us on a test database of 200,000 items. Sorry, no setup instructions as yet, but basically just have Java installed and run it on a linux box with port 8080 open and you should be fine.

Any code advice/criticism appreciated, in particular I'm not so sure how to go about letting devs acquire an instance of the Lucene class. At the moment I'm stuck with having a single default config set as a static, and using a static singleton method to get the singleton instance. I'd love to allow devs to use several instances with different configurations, probably via a registry / factory, unless anyone knows better.

Cheers!

Avatar
Tuckie

Community Member, 10 Posts

20 August 2011 at 8:38am

Very cool, I'll definitely give this a go at some point.