小编San*_*tha的帖子

在 solr 8 中的 fl 中使用父过滤器时,获取“当架构嵌套时不应发送父过滤器”

我正在尝试使用子文档获取父文档。但是出现“嵌套架构时不应发送父过滤器”错误。

在下面附上我尝试过的查询,但我无法得到解决方案

q : {!parent which=content_type:person}
fl : *, [child parentFilter=content_type:person]
Run Code Online (Sandbox Code Playgroud)

下面是我添加到 solr core 的文档。

   Collection<SolrInputDocument> batch = new ArrayList<>();
   // Parent Doc 1, a person mamed John Jones
    SolrInputDocument person1 = new SolrInputDocument();
    person1.addField( "id",            "john_jones" );
    person1.addField( "content_type",  "person"     );
    // "_t" suffix tells Solr that it's text
    person1.addField( "first_name_t",  "John"       );
    person1.addField( "last_name_t",   "Jones"      );
    // states and history used in edismax examples
    person1.addField( "states_t",      "California Nevada Idaho Maine" );
    person1.addField( "history_t",     "safe accident accident …
Run Code Online (Sandbox Code Playgroud)

solr solr8 solr-search

5
推荐指数
1
解决办法
1493
查看次数

标签 统计

solr ×1

solr-search ×1

solr8 ×1