You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by kristaclaire14 <kc...@gmail.com> on 2018/07/03 02:35:28 UTC
Block Join Child Query returns incorrect result
Hi,
I'm having a problem in my solr when querying third level child documents. I
want to retrieve parent documents that have specific third level child
documents. The example data is:
[{
"id":"1001"
"path":"1.Project",
"Project_Title":"Sample Project",
"_childDocuments_":[
{
"id":"2001",
"path":"2.Project.Submission",
"Submission_No":"1234-QWE",
"_childDocuments_":[
{
"id":"3001",
"path":"3.Project.Submission.Agency",
"Agency_Cd":"QWE"
}
]
}]
}, {
"id":"1002"
"path":"1.Project",
"Project_Title":"Test Project QWE",
"_childDocuments_":[
{
"id":"2002",
"path":"2.Project.Submission",
"Submission_No":"4567-AGY",
"_childDocuments_":[
{
"id":"3002",
"path":"3.Project.Submission.Agency",
"Agency_Cd":"AGY"
}]
}]
}]
I want to retrieve the parent with *Agency_Cd:ZXC* in third level child
document.
So far, this is my query:
q={!parent which="path:1.Project" v="path:3.Project.Submission.Agency AND
Agency_Cd:ZXC"}
My expected result is 0 but solr return parents with no matching child
documents based on the query. Am I doing something wrong on the query?
Thanks in advance.
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Block Join Child Query returns incorrect result
Posted by kristaclaire14 <kc...@gmail.com>.
Mikhail Khludnev-2 wrote
> Hello.
>
> {!parent} always searching for parents, some improvement is in progress,
> but you need to use [child] or [subquery] to see children.
> If you don't have an idea about search result add &explain=true param to
> get through matching details.
>
> On Mon, Jul 2, 2018 at 10:41 PM kristaclaire14 <
> kcaromualdo514@
> >
> wrote:
>
>> Hi,
>>
>> I'm having a problem in my solr when querying third level child
>> documents.
>> I
>> want to retrieve parent documents that have specific third level child
>> documents. The example data is:
>>
>> [{
>> "id":"1001"
>> "path":"1.Project",
>> "Project_Title":"Sample Project",
>> "_childDocuments_":[
>> {
>> "id":"2001",
>> "path":"2.Project.Submission",
>> "Submission_No":"1234-QWE",
>> "_childDocuments_":[
>> {
>> "id":"3001",
>> "path":"3.Project.Submission.Agency",
>> "Agency_Cd":"QWE"
>> }
>> ]
>> }]
>> }, {
>> "id":"1002"
>> "path":"1.Project",
>> "Project_Title":"Test Project QWE",
>> "_childDocuments_":[
>> {
>> "id":"2002",
>> "path":"2.Project.Submission",
>> "Submission_No":"4567-AGY",
>> "_childDocuments_":[
>> {
>> "id":"3002",
>> "path":"3.Project.Submission.Agency",
>> "Agency_Cd":"AGY"
>> }]
>> }]
>> }]
>>
>> I want to retrieve the parent with *Agency_Cd:ZXC* in third level child
>> document.
>> So far, this is my query:
>> q={!parent which="path:1.Project" v="path:3.Project.Submission.Agency AND
>> Agency_Cd:ZXC"}
>>
>> My expected result is 0 but solr return parents with no matching child
>> documents based on the query. Am I doing something wrong on the query?
>> Thanks in advance.
>>
>>
>>
>> --
>> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
I see, thank you Mikhail.
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Block Join Child Query returns incorrect result
Posted by Mikhail Khludnev <mk...@apache.org>.
Hello.
{!parent} always searching for parents, some improvement is in progress,
but you need to use [child] or [subquery] to see children.
If you don't have an idea about search result add &explain=true param to
get through matching details.
On Mon, Jul 2, 2018 at 10:41 PM kristaclaire14 <kc...@gmail.com>
wrote:
> Hi,
>
> I'm having a problem in my solr when querying third level child documents.
> I
> want to retrieve parent documents that have specific third level child
> documents. The example data is:
>
> [{
> "id":"1001"
> "path":"1.Project",
> "Project_Title":"Sample Project",
> "_childDocuments_":[
> {
> "id":"2001",
> "path":"2.Project.Submission",
> "Submission_No":"1234-QWE",
> "_childDocuments_":[
> {
> "id":"3001",
> "path":"3.Project.Submission.Agency",
> "Agency_Cd":"QWE"
> }
> ]
> }]
> }, {
> "id":"1002"
> "path":"1.Project",
> "Project_Title":"Test Project QWE",
> "_childDocuments_":[
> {
> "id":"2002",
> "path":"2.Project.Submission",
> "Submission_No":"4567-AGY",
> "_childDocuments_":[
> {
> "id":"3002",
> "path":"3.Project.Submission.Agency",
> "Agency_Cd":"AGY"
> }]
> }]
> }]
>
> I want to retrieve the parent with *Agency_Cd:ZXC* in third level child
> document.
> So far, this is my query:
> q={!parent which="path:1.Project" v="path:3.Project.Submission.Agency AND
> Agency_Cd:ZXC"}
>
> My expected result is 0 but solr return parents with no matching child
> documents based on the query. Am I doing something wrong on the query?
> Thanks in advance.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>
--
Sincerely yours
Mikhail Khludnev