Querying a child collection by multiple values in RavenDB

前端 未结 3 2005
野性不改
野性不改 2021-01-02 20:21

I\'m using RavenDB build 371 and I have the following model:

class Product {
 public string Id { get; set; }
 public ProductSpec[] Specs { get; set; }
}

cla         


        
3条回答
  •  孤城傲影
    2021-01-02 20:49

    I have tried different things, and could not make it work either. The specific query you are trying to execute is resolved to this Lucene query by RavenDB (in version 426):

    "{(Name:Color AND Value:Red) AND (Name:Country AND Value:US)}" which explains why you get no result.

    After googling on the subject, I found this post: Lucene Query Syntax

    Different workarounds are suggested among the answers. Hope this will help. Im rather curious myself though, if this really isn't possible.

提交回复
热议问题