rajeshpanwar
rajeshpanwar

Reputation: 1233

How to create solr core (collection) using solr Rest API?

i am new in solr and try to using solr in our nodejs project.

There is multiple databases in our nodejs project(mongodb database) and each database has "products" collection. I want to use solr for searching on Server.

I want to create a new core (collection) with name "databasename_products" for each database to store their products data in solr. For every change in products document, i want to update data in solr core (collection).

How can i create new core (collection) in solr using solr REST API ? Is there is better approach to fulfill our requirement ?

Upvotes: 1

Views: 1750

Answers (1)

Abhijit Bashetti
Abhijit Bashetti

Reputation: 8678

Please find the link which give all the details of it

create core

I have the same approach for my project, where in I have created a separate core for each project/workspace.

All the updated of the respective project/workspace happen to the same workspace .

I have created the core with project/workspace name.

Search query fired from a workspace goes to the specific core and not all.

In my view creating a seperate core is sort of having indexes to your data.

This improves the performance as it has to search in a perticular chuck or within one specified core.

Upvotes: 1

Related Questions