In Raven I am saving json documents, I wish to make an index that makes an object array in this json searchable. An example from this is the following json structure.
"OrderProperties": [
{
"Key": "UserProfileType",
"Value": "ClubMember"
},
{
"Key": "FirstTimeReferer",
"Value": "some value"
}
]
I have tried to make an index that would work for it in raven studio. First I tried to do:
from doc in docs.WebOrderModels
select new {
OrderProperties = doc.OrderProperties
}
Which did not work so I tried with the following
from doc in docs.WebOrderModels
select new {
OrderProperties_Key = doc.OrderProperties.Key,
OrderProperties_Value = doc.OrderProperties.Value,
}
However this still leaves the objects un-indexed so I cannot filter a search based on this. Is there a way where I can create an index that makes the key, value pairs from json searchable?