'What is the difference between search index refresh & search index rebuild in sitecore content search
can anybody tell me the difference between I can see the difference in terms of execution time but I want difference from feature perspective.
void Rebuild();
void Rebuild(IndexingOptions indexingOptions);
Task RebuildAsync(IndexingOptions indexingOptions, CancellationToken cancellationToken);
void Refresh();
void Refresh(IIndexable indexableStartingPoint, IndexingOptions indexingOptions);
void Refresh(IIndexable indexableStartingPoint);
Task RefreshAsync(IIndexable indexableStartingPoint, IndexingOptions indexingOptions, CancellationToken cancellationToken);
void Update(IEnumerable<IndexableInfo> indexableInfo);
void Update(IEnumerable<IIndexableUniqueId> indexableUniqueIds);
void Update(IEnumerable<IIndexableUniqueId> indexableUniqueIds, IndexingOptions indexingOptions);
void Update(IIndexableUniqueId indexableUniqueId);
void Update(IIndexableUniqueId indexableUniqueId, IndexingOptions indexingOptions);
Solution 1:[1]
Rebuild : If you have done any changes like for example... change in the schema.xml. The change is like you have added a field and changed the field type for a field. In such cases you would need to rebuild your indexes in order to reflect the change.
Refresh : If you want to add more or to update the data of your existing indexes. You will refresh it. For example : You have used DIH feature of Solr and indexed a database. If the data of the database gets added or modify value, it needs to be refresh in the Solr index. You will here use refresh by calling Delta import of Solr.
Update : You can specify which document to update by passing the unique id of document and what all fields you want to update in case you want any specific fields needs to updated.
Note : I did not used the above api. I would suggest you to go through the api documentation and read more about the specific api.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
