possible FAQ - lucene interop

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

possible FAQ - lucene interop

mgkimsal
Hello all:

We've got one java-based project at work using lucene.  I'm looking to use
solr as a search system for some other projects at work.  Once data is
indexed in solr, can we get at it using standard lucene libraries?  I know
how I want to use solr, but if the java devs need to get at the data as
well, I'd rather that 1) they be able to use their existing tech and skills
and 2) I not have to reindex everything in lucene-only indexes.

I've read the FAQs and some of the mailing list and couldn't find this
question addressed.

Thanks.

--
Michael Kimsal
http://webdevradio.com
Reply | Threaded
Open this post in threaded view
|

Re: possible FAQ - lucene interop

pgwillia
Hi Michael,

    What Solr is really doing is building a Lucene index.  In most cases a
Java developer should be able to access the index that Solr built through
the IndexReader/IndexSearcher classes and the location of the index that
Solr built.  See the Lucene API for details on these and other classes.
The default index location is in solr/data/index relative to where you
start the servlet which is running Solr.

Hope you find that helpful,
Tricia


On Wed, 17 Jan 2007, Michael Kimsal wrote:

> Hello all:
>
> We've got one java-based project at work using lucene.  I'm looking to use
> solr as a search system for some other projects at work.  Once data is
> indexed in solr, can we get at it using standard lucene libraries?  I know
> how I want to use solr, but if the java devs need to get at the data as
> well, I'd rather that 1) they be able to use their existing tech and skills
> and 2) I not have to reindex everything in lucene-only indexes.
>
> I've read the FAQs and some of the mailing list and couldn't find this
> question addressed.
>
> Thanks.
>
> --
> Michael Kimsal
> http://webdevradio.com
>
Reply | Threaded
Open this post in threaded view
|

Re: possible FAQ - lucene interop

mgkimsal
Thanks - that helps, and ideally should help with adoption questions here.
You said "most cases" - I've read something about "solr extends lucene" in
the docs.  Are there some specific solr-only bits of functionality that
would preclude vanilla-lucene code from accessing solr-created indexes?


On 1/17/07, Tricia Williams <[hidden email]> wrote:

>
> Hi Michael,
>
>     What Solr is really doing is building a Lucene index.  In most cases a
> Java developer should be able to access the index that Solr built through
> the IndexReader/IndexSearcher classes and the location of the index that
> Solr built.  See the Lucene API for details on these and other classes.
> The default index location is in solr/data/index relative to where you
> start the servlet which is running Solr.
>
> Hope you find that helpful,
> Tricia
>
>
> On Wed, 17 Jan 2007, Michael Kimsal wrote:
>
> > Hello all:
> >
> > We've got one java-based project at work using lucene.  I'm looking to
> use
> > solr as a search system for some other projects at work.  Once data is
> > indexed in solr, can we get at it using standard lucene libraries?  I
> know
> > how I want to use solr, but if the java devs need to get at the data as
> > well, I'd rather that 1) they be able to use their existing tech and
> skills
> > and 2) I not have to reindex everything in lucene-only indexes.
> >
> > I've read the FAQs and some of the mailing list and couldn't find this
> > question addressed.
> >
> > Thanks.
> >
> > --
> > Michael Kimsal
> > http://webdevradio.com
> >
>



--
Michael Kimsal
http://webdevradio.com
Reply | Threaded
Open this post in threaded view
|

Re: possible FAQ - lucene interop

Chris Hostetter-3

: Thanks - that helps, and ideally should help with adoption questions here.
: You said "most cases" - I've read something about "solr extends lucene" in
: the docs.  Are there some specific solr-only bits of functionality that
: would preclude vanilla-lucene code from accessing solr-created indexes?

the notion that Solr "extends" Lucene is primarily in terms of the HTTP
API it provides, but there is lots of code in the Solr code base that
extends the fuctionality of Lucene in various ways ... FunctionQueries for
example, and support for them in the SolrQueryParser (which is a subclass
of the Lucene QueryParser).  If your primary concern is that you
want to allow people writting apps using the raw Lucene APIs want to be
able to access your index, your only real concern is in how you design
your schema ... whatever analyzers you use on text fields will need to be
available to the other clients, if you use the any of the complex field
types, (sortable ints, dates, etc) then those other apps will need to know
how to convert values before querying those fields.

in addition to the solr.war, the solr distributions include a jar
containing all of the stock code that ships with Slr -- primarily for
compiling against when building plugins, but that same code JAR could be
used by standalone Lucene apps to access the various TokenFilters and
FieldTypes that Solr provides if you use them in your schema.


-Hoss