AutoMap with different indices

Hi everyone,
we have a largish database setup using EntityFramework with many entities linked to each other in many different ways.

We have four different indices that present four different views of this data. For each of these indices we use the AutoMap functionnality of the C# Nest library to discover the structure, and up till now that worked fine, if a bit slowly. Recently we had to add more entities and relations and now we get OutOfMemory exceptions.

All the possible fixes that I can see have serious drawbacks...

  1. We could use the fluent API to define the mapping, but this would involve a HUGE amount of work to write the mapping, unless the fluent API provides a way of automatically mapping all properties of simple types (ints, enums, doubles, strings, etc).
  2. We could use the Ignore attribute to ignore properties if only it were possible to Ignore a property for a single index and not for the other indices.
  3. We could use the visitor pattern to ignore certain properties for certain indices, but I can't see how to ignore properties in some parts of an index and not others. For example, we don't need supplier.contact.address, but we do need supplier.address.

Any ideas?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.