RavenDB allows you to manage temporary indexes using the server configuration file option. Also, RavenDB will optimize itself by deleting temporary indexes if they have not been used for a given time, or will promote them to permanent indexes if they have been used enough.
These following steps summarize the temporary index management process in RavenDB:
RavenDB looks for appropriate index to use in query.
If found, it will return the most appropriate index.
If not found, it will create an index that will deal with the query.
Return that index as temporary.
If that index is used enough, promote it into an Auto index
Note
Temporary indexes behavior is controlled by these configuration settings:
Raven/TempIndexPromotionThreshold
andRaven/TempIndexPromotionMinimumQueryCount
.By default, the number of times a temporary index has to be queried before becoming a permanent index is 100. You can change these settings by changing the value of the
Raven/TempIndexPromotionMinimumQueryCount...