3

I am working in a project that has a large amount of data in Lucene. We need to show a faceted search and the time required for it is unacceptable when trying to simulate it using regular Lucene accesss.

I have been reading about Solr, but tutorials are not very clear about this basic point:

Is the data stored in the same way using Solr and Lucene? I mean, could I access the data I have stored with Lucene by using Solr or would I have to make a data migration?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Carlos
  • 99
  • 2
  • 6
  • 1
    Have you thought of what might be making your query times "unacceptable"? How do you define "big amount of data"? As an example, we query almost a TB of data direct to a Lucene index without any issues. You should look into the best practices for querying large indices. Bottomline: while Solr is great and offers a lot of functionality out-of-the-box, you ought to consider the trade-offs. – Mikos Apr 02 '10 at 04:40

3 Answers3

8

Yes, you can use the same Lucene index in a Solr instance. You only need to create a schema.xml to match the fields you have in your index.

Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275
2

Solr is basically a wrapper around the lucene functionality, making things a little easier (like providing an administration interface). If you are using Solr, you are by definition using the lucene search engine.

More info here.

Community
  • 1
  • 1
davek
  • 22,499
  • 9
  • 75
  • 95
2

While you could use the Lucene directly under Solr the way Mauricio highlighted, unless you had some special reason, like you can't reindex the data because the data is gone, then I feel like you would be swimming uphill to just put your index into Solr...

And you most likely will need to reindex data anyway at some point, so figuring out how to do it in using the better indexing options that Solr provides would save time in the longer run.

Eric Pugh
  • 1,563
  • 11
  • 17