You are currently browsing legacy 4.0 version of documentation. Click here to switch to the newest 5.0 version.
Create Multi-Map Index
A Multi-Map index allows to index data from multiple different collections.
RavenDB will generate a single Multi-Map index.
The results of querying the Multi-Map index will include data from all these collections.
Multi-Map indexes require that all the Map functions defined have the same output structure.
In this page:
Creating Multi-Map index
Define a Map Function:
Collection field indexed in the above example is not mandatory but can be useful upon querying.
Add another Map Function:
Any number of additional Map functions can be added.
Each added Map should have the same output fields.
i.e. In the above example, the common indexed fields are:
So when querying on this Multi-Map index, results will come from both Employees collection and Companies collection.