You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Commands: Indexes: How to get index merge suggestions?

GetIndexMergeSuggestions will retrieve all suggestions for an index merging.

Syntax

curl \
	http://{serverName}/databases/{databaseName}/debug/suggest-index-merge \
	-X GET

Response

Status code Description
200 OK
Return Value Description
payload IndexMergeResults

Example I

curl -X GET "http://localhost:8080/databases/NorthWind/debug/suggest-index-merge" 
< HTTP/1.1 200 OK
{
	"Unmergables":
	{
		"Raven/DocumentsByEntityName":"Cannot merge indexes that are using a let clause",
		"Orders/ByCompany":"Cannot merge map/reduce indexes",
		"Product/Sales":"Cannot merge map/reduce indexes"
	},
	"Suggestions":
	[
		{
			"CanMerge":["Orders/Total2s","Orders/Totals"],
			"Collection":"Orders",
			"MergedIndex":  {mergedIndexDefinition} 
		}
	]
}