Struggling to flatten document using LINQ map index #21129
-
Hi, I know this is a very basic question, but I have been wrestling with this for the last few days and I am not sure what I am doing wrong. I have a number of documents with the format below:
I m trying to create a map index that is going to extract all the objects of type
I have tried defining such index in a number of ways in RavenDB Studio, but I have had no luck. Every time, it returns all the documents of type
I have also tried to define it using
I have tried various combinations of the 2 above to no luck. I have also defined fields for each of the lines in the I am not totally sure what I am doing wrong, as I thought I understood how to flatten a document, but obviously, I am doing something wrong. Please let me know what the code of the map index should be. As an FYI, I am running RavenDB 5.4.111. Thanks a lot in advance for the help, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
A few things:
For something like this, you may want to use javascript to process this directly:
I think that this what you want it to do. Note that you are doing fanout here (which I assume is what you want). Are you trying to search for a particular run, or find a particular jack pot matching stuff in the run? Another option would be to output a single result, like so:
|
Beta Was this translation helpful? Give feedback.
Take a look at this query:
Using this index: