You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Maik Schreiber <bl...@blizzy.de> on 2005/05/16 18:11:23 UTC
Contribution: LuceneIndexAccessor
Hi,
My company would like to make the following contribution to Lucene (in
sandbox?) licensed under the Apache License, Version 2.0.
Background: While doing project work on a web-based search engine we have
developed a component called LuceneIndexAccessor. This component provides a
high-level index access interface, that is, it synchronizes read/write
access to a Lucene index. You no longer need to worry about concurrently
opening readers/writers/searchers. The component also does caching where
applicable. Further, it makes sure that all Searchers get closed whenever
you have added a document to the index.
You can download the source here:
http://www.blizzy.de/lucene/lucene-indexaccess-0.1.0.zip
Using LuceneIndexAccessor is incredibly simple:
Directory directory = ...
Analyzer analyzer = ...
// somewhere near program start
IIndexAccessProvider accessProvider =
new IndexAccessProvider(directory, analyzer);
ILuceneIndexAccessor accessor = new LuceneIndexAccessor(accessProvider);
accessor.open();
IndexWriter writer = null;
try {
writer = accessor.getWriter();
// use writer...
} catch (IOException e) {
// ...
} finally {
accessor.release(write);
}
// somewhere near program exit
accessor.close();
(Opening IndexReaders or Searchers follows the same use pattern.)
Right now, the source compiles against a CVS version of Lucene. Also, it
uses Log4J for logging. We're happy with changing that if need arises.
--
Maik Schreiber * http://www.blizzy.de
GPG public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1F11D713
Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640 1F11 D713
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: Contribution: LuceneIndexAccessor
Posted by Daniel Naber <lu...@danielnaber.de>.
On Wednesday 18 May 2005 12:22, Maik Schreiber wrote:
> > Is it possible to
> > contribute it with the copyright assigned to the Apache Software
> > Foundation? I'm not sure if we can add code (to the core at least)
> > that's not copyright by the ASF.
>
> I think that's fine. Is there a specific way to go about reassigning?
The best thing AFAIK is to just change the copyright in your files to
"Copyright 2005 The Apache Software Foundation"
and then open a bug report where you attach the new version.
Regards
Daniel
--
http://www.danielnaber.de
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: Contribution: LuceneIndexAccessor
Posted by Maik Schreiber <bl...@blizzy.de>.
> Thanks, that sounds useful. Are there any test cases?
Not yet, but we're using it in a few production systems without any quirks. I
will try and go about writing them.
> Is it possible to
> contribute it with the copyright assigned to the Apache Software
> Foundation? I'm not sure if we can add code (to the core at least) that's
> not copyright by the ASF.
I think that's fine. Is there a specific way to go about reassigning?
--
Maik Schreiber * http://www.blizzy.de
GPG public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1F11D713
Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640 1F11 D713
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: Contribution: LuceneIndexAccessor
Posted by Daniel Naber <lu...@danielnaber.de>.
On Monday 16 May 2005 18:11, Maik Schreiber wrote:
> My company would like to make the following contribution to Lucene (in
> sandbox?) licensed under the Apache License, Version 2.0.
Thanks, that sounds useful. Are there any test cases? Is it possible to
contribute it with the copyright assigned to the Apache Software
Foundation? I'm not sure if we can add code (to the core at least) that's
not copyright by the ASF.
Regards
Daniel
--
http://www.danielnaber.de
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org