我正在尝试使用子文档获取父文档。但是出现“嵌套架构时不应发送父过滤器”错误。
在下面附上我尝试过的查询,但我无法得到解决方案
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)