Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr - How to index on multiple entities?

Tags:

solr

I have two tables contacts and inventory. These two tables are not related. I want to index these two tables and search using Solr.

Is this possible?

like image 583
arun Avatar asked Jul 05 '11 12:07

arun


People also ask

How can I make Solr index faster?

Tip #6: commit at the end The auto-commit settings, shown below, can be configured in the solrconfig. xml file. If you configure your index to commit at the end of the indexing process, the auto-commit can efficiently perform commits during the indexing process and limit the performance impact on your indexing process.

How do I run Solr indexing?

If you didn't start Solr after installing it, you can start it by running bin/solr from the Solr directory. If you are running Windows, you can start Solr by running bin\solr. cmd instead. This will start Solr in the background, listening on port 8983.

How does Solr indexing work?

Solr works by gathering, storing and indexing documents from different sources and making them searchable in near real-time. It follows a 3-step process that involves indexing, querying, and finally, ranking the results – all in near real-time, even though it can work with huge volumes of data.


1 Answers

If some part of your application needs to search for contacts, and another one needs to search in the inventory, create two separate indices. Storing wildly different data in the same index is almost never a good idea, it complicates things unnecessarily. As the Solr wiki wisely says:

The more heterogeneous (different kinds of data) you have in one field or in one index, the less useful it is.

You don't need to have multiple Solr instances to accomodate multiple indices, you can easily manage this with multi-core.

like image 194
Mauricio Scheffer Avatar answered Oct 10 '22 00:10

Mauricio Scheffer