This is kind of awkward and makes it impossible to use compound indexes with varying types (object[] does not work). Furthermore, there was no way to programmatically create a compound index.
I extended the driver with a way to define those compound indexes. Here is how you can use it with GetAll:
And here is how you can create new compound indexes:
Person.Db.IndexCreate("AbcIndex", CompoundIndex<Person>.Make(a => a.SomeString, a => a.SomeOtherString, a => a.SomeNumber, a => a.SomeBool, a => a.SomeFloatingPoint));
Greetings!
I wanted to use compound indexes with the driver, but that feature was not implemented. Turns out it works by providing an array as an index:
This is kind of awkward and makes it impossible to use compound indexes with varying types (
object[]
does not work). Furthermore, there was no way to programmatically create a compound index.I extended the driver with a way to define those compound indexes. Here is how you can use it with GetAll:
And here is how you can create new compound indexes:
Kind regards, Nico