Index Values in dictionary

45 views
Skip to first unread message

Derek den Haas

unread,
Feb 25, 2015, 4:51:35 AM2/25/15
to rav...@googlegroups.com
I got documents like:

{
    Id: bla,
    Dict: {
        nl: "test",
        de: "test1",
        fr: "test2"
    }
}

And want to create an index which will search all 3 values inside the dictionary, I ended up using:

Index
{
    "Query": this.Dict.Values
}

But it won't give me any results when searching on "test". The list in "Terms" (in the ravendb studio on this index) is also empty. Any ideas?

Oren Eini (Ayende Rahien)

unread,
Feb 25, 2015, 9:59:23 AM2/25/15
to ravendb
What is this?

Index
{
    "Query": this.Dict.Values
}

That isn't anything like RavenDB syntax for anything.


Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Derek den Haas

unread,
Feb 26, 2015, 6:05:55 AM2/26/15
to rav...@googlegroups.com
The Select(result => new {}) without Select(result => new

But to be exactly:

Name: EntityMappingAll
Maps:
docs.EntityMappings.Select(result => new {
    Targets = result.Targets.Values,
    Type = result.Type,
    CreationDate = result.CreationDate
})

Targets is filled with a Dictionary<string, string>(); but the Values are not being indexed (nothing is to be exactly).

When loking at Indexes -> EntityMappingAll -> Terms
The list of targets is empty. (there should be 10.000 items)


Op woensdag 25 februari 2015 15:59:23 UTC+1 schreef Oren Eini:

Oren Eini (Ayende Rahien)

unread,
Feb 26, 2015, 6:28:06 AM2/26/15
to ravendb
docs.EntityMappings.Select(result => new {
    Targets = result.Targets.Select(x=>x.Value),
    Type = result.Type,
    CreationDate = result.CreationDate
})

Reply all
Reply to author
Forward
0 new messages