[ 
https://issues.apache.org/jira/browse/DERBY-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13902897#comment-13902897
 ] 

Rick Hillegas commented on DERBY-590:
-------------------------------------

We have identified several issues with the current patch for Lucene support:

1) It is not protected by SQL authorization.

2) It is not protected by database encryption.

3) It is not protected by backup/restore.

4) It does not work with in-memory databases.

In a follow-on comment, I will offer a revised patch and propose a solution to 
issue 1). But first I would like to describe an effort I made to store Lucene 
indexes in the database.

Many issues with Lucene support could be solved if the Lucene index could be 
stored in the database. That would give us 1-4 for free. I searched for an 
off-the-shelf solution and I came across many pointers to a bundle of freeware 
called JdbcDirectory: 
http://www.compass-project.org/docs/2.2.0/reference/html/jdbcdirectory.html. 
This freeware provides an alternative implementation of the Lucene Directory 
interface, allowing you to represent indexes as Blobs.

JdbcDirectory appears to be an abandoned effort. It must have worked with an 
older version of Lucene, but it does not run out-of-the-box with Lucene 4.5.0. 
I was not able to re-compile JdbcDirectory against Lucene 4.5.0. I think that 
some effort is needed to revive the JdbcDirectory solution.

Other pointers suggested that JdbcDirectory performs poorly. So even after 
reviving this solution, it would address issues 1-4 at the cost of a 
significant performance hit.

There may be other solutions to the problem of storing Lucene indexes in the 
database. However, I suspect that they all suffer from the fact that Lucene is 
a moving target. Lucene does not make the extensive backward-compatibility 
guarantees which Derby does. I have come to the following conclusions:

1) Any effort to store Lucene indexes in the database is likely to break when 
customers upgrade their Lucene installation in order to take advantage of 
improvements to Lucene.

2) As we pursue the approach begun in Andrew's patch, we should remember to 
document this warning: When you upgrade your Lucene installation, make sure you 
unload and then reload the Lucene support tool.


> How to integrate Derby with Lucene API?
> ---------------------------------------
>
>                 Key: DERBY-590
>                 URL: https://issues.apache.org/jira/browse/DERBY-590
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation, SQL
>            Reporter: Abhijeet Mahesh
>              Labels: derby_triage10_11
>         Attachments: lucene_demo.diff, lucene_demo_2.diff
>
>
> In order to use derby with lucene API what should be the steps to be taken? 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to