Hi derby-dev! I had a couple of free afternoons and so I took a swing at a simple lucene integration demo, since full-text search is the most requested Derby feature. Attached is my very rough but working results. I don't know how much time I'll have to continue working on it, but I thought maybe if I could produce at least a working demo then maybe that could get the ball rolling. I could certainly at least clean this up to the Derby code standards and put together a wiki page primer that could be included in the demo package at the very least. :-)
As it stands, I think it will be good for discussion as to whether this would be a useful feature to continue working on. It seems like it would be pretty easy to wire the index creation into the sql grammar and storing the lucene indexes in the database would be pretty straightforward by replacing those FSDirectory.open calls. I realized as I was typing this that the test data I was using might be considered copyrighted. So I put the ij script in my personal directory here: http://people.apache.org/~fuzzylogic/lucene_titles.sql until I can find some public domain data. That includes some queries that give you an idea of what is possible. I attached one query with results as lucene_query.txt so you could see some results without having to apply the patch and run a build. Speaking of which, to build, you'll need to drop the lucene-core, lucene-analyzers-common, and lucene-queryparsers jars from lucene-4.5.0 into tools/java after applying the patch to build (although it shouldn't break your build after applying the patch if you don't). Anyway, enjoy, and let me know what you think. cheers, andrew
ij> select title, subtitle, rank from titles, table ( LUCENEQUERY('american
-mexican', 'MUSE.TITLES', 'SUBTITLE', 0) ) luceneResults where
titles.id=integer(luceneresults.keyvalue) and rank < 1.5;
TITLE |SUBTITLE
|RANK
----------------------------------------------------------------------------------------------------------
Artistic Liberties |American Literary Realism and Graphic
I&|1.336856
Accomplishing NAGPRA |Perspectives on the Intent, Impact,
and&|1.1140467
Feminism as Life's Work |Four Modern American Women through Two
&|1.1140467
Everyday Atlantic, The |Time, Knowledge, and Subjectivity in
th&|1.1140467
lucene_demo.diff
Description: Binary data
