하위 문서를 가져 오기 위해 블록 조인 쿼리를 실행하려고하는데 "상위 쿼리에서 부모 필터와 일치하지 않는 문서를 생성합니다"오류가 발생합니다. 내가 SOLR 5.5하위 문서에 대한 Solr 쿼리 방법
내 스키마는 다음과 같습니다을 사용하고 있습니다 :
삽입 문은 다음과 같습니다
<field name="url" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="name" type="text_en" indexed="true" stored="true" required="true" multiValued="false" />
<field name="content_type" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<uniqueKey>url</uniqueKey>
: 콘솔이 3을 다시 끌어에서 표준
*:*
쿼리를 실행
{
"url": "http://www.test.com/index.html",
"name": "parent product",
"content_type": "parentDocument",
"_childDocuments_": [
{
"url": "http://www.test.com/index2.html",
"name": "child product",
"content_type": "childDocument"
},
{
"url": "http://www.test.com/index3.html",
"name": "child product 2",
"content_type": "childDocument"
}
]
}
자녀가 부모에게 속해 있다는 것을 보여줍니다.
{
"docs": [
{
"url": "http://www.test.com/index2.html",
"name": "child product",
"content_type": "childDocument",
"_root_": "http://www.test.com/index.html"
},
{
"url": "http://www.test.com/index3.html",
"name": "child product 2",
"content_type": "childDocument",
"_root_": "http://www.test.com/index.html"
},
{
"url": "http://www.test.com/index.html",
"name": "test product",
"content_type": "parentDocument",
"_version_": 1541193313504198700,
"_root_": "http://www.test.com/index.html"
}
]
}
내가 쿼리의 어떤 종류를 추가하는 경우하지만, 예를 들어 오류가
{
"responseHeader": {
"status": 0,
"QTime": 0,
"params": {
"q": "{!child of=\"content_type:parentDocument\"}",
"indent": "true",
"wt": "json"
}
},
"response": {
"numFound": 1,
"start": 0,
"docs": [
{
"url": "http://www.test.com/index.html",
"name": "test product",
"content_type": "parentDocument",
"_version_": 1541193313504198656,
"_root_": "http://www.test.com/index.html"
}
]
}
}
을 : 나는 q={!child of="content_type:parentDocument"}
을 실행하면 617,451,515,
그러나 나는 문은 "의 아이를"주어진 기대하지 않을 것이다 부모 문서를 얻을 수
q={!child of="content_type:parentDocument"}name:product
또는
q={!child of="content_type:parentDocument"}name:*
"부모 필터에 의해 일치하지 않는 부모 쿼리 수율 문서 수있는 ID = 0"그래서 나는 지금 쿼리가 자식 문서를 반환 할 수 없습니다 그것을 이해
이 할 수있는 방법이 있나요 SOLR 5.3처럼 보인다 아동의 부모를 얻으려면/@ alisazhila/solr-s-nesting-on-solr-s-capabilities-to-handle-deep-nested-document-structures-50eeaaa4347a – adam