Finn
Finn

Reputation: 952

How to use Solr for multiple data sources?

I am a newbie to Solr & is facing challenges as below.

I have two data sources : a portal & a cms. I need to provide Solr search solution for these two sources so that when user searches on custom portlet(on portal), he should see results from both the sources at same place or Solr should fetch results from both sources. Also user should be able to access these results by clicking on same.

What all should i consider for implementing this use case. Should i use multiple Solr cores or single core? Also how can i achieve features like faceted search, search filter, stop words etc.?

Regards.

Upvotes: 1

Views: 4167

Answers (2)

Finn
Finn

Reputation: 952

I figured out a way to do the same. We can use http://wiki.apache.org/solr/Solrj as java client for Solr. Alfresco content can be put into XMLs & these XMLs can be dumped into SOlr using Solrj.

Upvotes: 0

Marek Piechut
Marek Piechut

Reputation: 557

It should be perfectly fine to go with single core (and it will also work faster).

To import data from multiple data sources check out Solr Data Import Handler configuration: http://wiki.apache.org/solr/DataImportHandler and setup two entities - one for each of your data sources. You will probably need to set some field to keep information about data source in imported document.

Your question is little bit too general to really answer. Go and experiment a little bit with documentation you have. It should not be very hard to get some basic search functionality.

You can find a lot of info about configuring Solr on LucidWorks wiki: http://docs.lucidworks.com/display/solr/Faceting and on Solr wiki: http://wiki.apache.org/solr/

You may also try with some books. Ex: http://www.packtpub.com/apache-solr-4-cookbook/book

Upvotes: 2

Related Questions