Jimm
Jimm

Reputation: 8505

Solr warmup cache queries

We do bulk updates to Solr index. We have configured warmup queries in solrconfig.xml under newSearcher and firstSearcher to populate the fieldValueCache. My questions are:-

  1. If 200 calls are made to update Solr index, will Solr run the warmup queries 200 times?
  2. What are the events that trigger cache invalidation and cache population? For example, When new data is added or existing data is modified (Deleted and added again), will newSearcher automatically run to update fieldValueCache?

Upvotes: 1

Views: 815

Answers (1)

Alexandre Rafalovitch
Alexandre Rafalovitch

Reputation: 9789

The cache is invalidated on commit. And until you commit (manually or with auto-settings), you will not see your documents.

So, if you do bulk updates, you should remove the AutoCommit sections from solrconfig.xml and do manual commit at the end of the bulk update. Of course, if you send all 200 documents in one big XML, it will also be ok even with auto-commit.

Upvotes: 1

Related Questions