anand
anand

Reputation: 11

Solr delay in response when passing a big condition as filter

I am performing an online search through solr where I need to pass 25000 id's as a filter to solr. In this scenario, solr is giving a very slow response due to which my application is not performing as expected. Kindly help, if someone has faced a similar issue

Upvotes: 1

Views: 172

Answers (1)

Badal Singh
Badal Singh

Reputation: 918

Solr tokenizes the data and create a inverted index and and does the same for search query which help in searching which is not possible in case of database.

Generally id's(primary key) do not have white space, hyphen etc which help in tokenizing and indexing of data simply create an index similar to database only and when you search it is almost similar to flat file search.

In simple words searching id in solr is not efficient but on the other hand

A database create a BTree for database which is most optimum data structure for search on index and sort it in a order so searching 25000 ids in database would be much faster. But don't expect it to be lightning fast.


This answer is posted making a basic assumption of your id whose datatype and other detail are not known.

Upvotes: 1

Related Questions