You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by spredd1208 <sc...@gmail.com> on 2012/07/25 00:05:07 UTC

Copy lucene index into Solr

Is there a best practice to copy a lucene index which is built using the core
API of Lucene 3.6 into a
solr server (also 3.6) and then have it work?

I cannot find a mapping anywhere of lucene fields to solr fields and what
the corresponding schema.xml would look like.

This seems like something that should be on page 1 of the solr docs, but I
cannot find it ANYWHERE!

Is this possible? If not I would really like to know now, because I will
need to toss SOLR before getting stuck in a dead end.

Thanks.



--
View this message in context: http://lucene.472066.n3.nabble.com/Copy-lucene-index-into-Solr-tp3997078.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Copy lucene index into Solr

Posted by spredd1208 <sc...@gmail.com>.
On Wed, Jul 25, 2012 at 8:58 AM, spredd1208 [via Lucene] <
ml-node+s472066n3997251h18@n3.nabble.com> wrote:

> So I am familiar with SOLR. I have built fairly extensive solr indexes
> already. What I am trying to do now
> is build very large indexes and then move them over to a sharded server
> environment that will allow clients to query them.
>
> These indexes will be built once and will not be updated or need
> deletions.
>
> Solr only exposes a REST api and does not allow indexes to be built
> (locally via an API) and then copied to a directory and have a Solr server
> started over them.
>
> Lucene has a very basic indexing API that I am surprised SOLR does not
> support via their schema.
>
> Looks like I will need to try something like Katta. In my opinion this is
> a fundamental design decision where solr REALLY dropped the ball for very
> large scale indexing. At least I know now...
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://lucene.472066.n3.nabble.com/Copy-lucene-index-into-Solr-tp3997078p3997251.html
>  To unsubscribe from Copy lucene index into Solr, click here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3997078&code=c2NvdHQubS5wcmVkZHlAZ21haWwuY29tfDM5OTcwNzh8MjAzMzAwMTcwMQ==>
> .
> NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://lucene.472066.n3.nabble.com/Copy-lucene-index-into-Solr-tp3997078p3997252.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Copy lucene index into Solr

Posted by spredd1208 <sc...@gmail.com>.
So I am familiar with SOLR. I have built fairly extensive solr indexes
already. What I am trying to do now
is build very large indexes and then move them over to a sharded server
environment that will allow clients to query them. 

These indexes will be built once and will not be updated or need deletions. 

Solr only exposes a REST api and does not allow indexes to be built (locally
via an API) and then copied to a directory and have a Solr server started
over them. 

Lucene has a very basic indexing API that I am surprised SOLR does not
support via their schema.

Looks like I will need to try something like Katta. In my opinion this is a
fundamental design decision where solr REALLY dropped the ball for very
large scale indexing. At least I know now...



--
View this message in context: http://lucene.472066.n3.nabble.com/Copy-lucene-index-into-Solr-tp3997078p3997251.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Copy lucene index into Solr

Posted by Lance Norskog <go...@gmail.com>.
It will be easier to understand these if you make an index in Solr and
examine it with the Luke program. Build Solr,
cd solr/example
java -jar start.jar
in another window
cd solr/exampledocs
sh post.sh *.xml

Now use Luke on the index in solr/example/solr/collection1/data/index

You will see what fields are made by indexing.

In general, very few people move binary indexes from Lucene to Solr or
between Solr versions. Lucene is not a database. There are people who
use it as their system of record, but that is not wise. You should be
able to reindex everything from your original data.

On Tue, Jul 24, 2012 at 6:11 PM, spredd1208 <sc...@gmail.com> wrote:
> So on the lucene side I am only using:
>
> http://lucene.apache.org/core/3_6_0/api/core/org/apache/lucene/document/Field.html#Field(java.lang.String,
> java.lang.String, org.apache.lucene.document.Field.Store,
> org.apache.lucene.document.Field.Index)
>
> and
> http://lucene.apache.org/core/3_6_0/api/core/org/apache/lucene/document/NumericField.html#NumericField(java.lang.String,
> org.apache.lucene.document.Field.Store, boolean)
>
> to index my fields.
>
> How does this line up with solr?
>
> What do I use for my field types in my schema and how will this affect my
> use and/or limits of using solr's query and index configurations?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Copy-lucene-index-into-Solr-tp3997078p3997105.html
> Sent from the Solr - User mailing list archive at Nabble.com.



-- 
Lance Norskog
goksron@gmail.com

Re: Copy lucene index into Solr

Posted by spredd1208 <sc...@gmail.com>.
So on the lucene side I am only using:

http://lucene.apache.org/core/3_6_0/api/core/org/apache/lucene/document/Field.html#Field(java.lang.String,
java.lang.String, org.apache.lucene.document.Field.Store,
org.apache.lucene.document.Field.Index)

and
http://lucene.apache.org/core/3_6_0/api/core/org/apache/lucene/document/NumericField.html#NumericField(java.lang.String,
org.apache.lucene.document.Field.Store, boolean)

to index my fields.

How does this line up with solr?

What do I use for my field types in my schema and how will this affect my
use and/or limits of using solr's query and index configurations?



--
View this message in context: http://lucene.472066.n3.nabble.com/Copy-lucene-index-into-Solr-tp3997078p3997105.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Copy lucene index into Solr

Posted by Upayavira <uv...@odoko.co.uk>.
Solr places constraints upon what you can do with your lucene index
(e.g. You must conform to a schema). If your Lucene index cannot be
mapped to a schema, then it cannot be used within Solr.

Upayavira

On Tue, Jul 24, 2012, at 11:05 PM, spredd1208 wrote:
> Is there a best practice to copy a lucene index which is built using the
> core
> API of Lucene 3.6 into a
> solr server (also 3.6) and then have it work?
> 
> I cannot find a mapping anywhere of lucene fields to solr fields and what
> the corresponding schema.xml would look like.
> 
> This seems like something that should be on page 1 of the solr docs, but
> I
> cannot find it ANYWHERE!
> 
> Is this possible? If not I would really like to know now, because I will
> need to toss SOLR before getting stuck in a dead end.
> 
> Thanks.
> 
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Copy-lucene-index-into-Solr-tp3997078.html
> Sent from the Solr - User mailing list archive at Nabble.com.