Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (41 sloc) 2.15 KB

Create Multi-Map Index

{NOTE: }

  • 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:

{PANEL: Creating Multi-Map index}

Define a Map Function:
Figure 1. Initial Map Function

{NOTE: }

The Collection field indexed in the above example is not mandatory but can be useful upon querying. {NOTE/}

Add another Map Function:
Figure 2. Add Another Map Function

{NOTE: }

  • 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: Name & Collection.

  • So when querying on this Multi-Map index, results will come from both Employees collection and Companies collection.

  • Index field options, Configuration & Additional Sources can be defined for the Multi-Map index in the same way as done for a Simple Map Index.
    {NOTE/} {PANEL/}

Related Articles



You can’t perform that action at this time.