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/05/30 01:01:05 UTC

Find value in Parent doc fields OR Child doc fields

Hi,

I want to query/find a value that may match on parent document fields or
child document fields. Is this possible using block join parent query
parser? How can I do this with solr nested documents? Here is the example
data:

[{
    "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"
        }]
    },{
        "id":"2003",
        "path":"2.Project.Submission",
        "Submission_No":"7891-QWE",
        "_childDocuments_":[
        {
            "id":"3003",
            "path":"3.Project.Submission.Agency",
            "Agency_Cd":"QWE"
        }]
    }]
}]

I want to retrieve all Projects with Project_Title:*QWE* OR
Submission_Submission_No:*QWE*. Thanks in advance.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Find value in Parent doc fields OR Child doc fields

Posted by Erick Erickson <er...@gmail.com>.
Asher:

Please follow the instructions here:
http://lucene.apache.org/solr/community.html#mailing-lists-irc. You
must use the _exact_ same e-mail as you used to subscribe.

If the initial try doesn't work and following the suggestions at the
"problems" link doesn't work for you, let us know. But note you need
to show us the _entire_ return header to allow anyone to diagnose the
problem.

Best,
Erick

On Wed, May 30, 2018 at 12:05 AM, Aniket Khare <an...@gmail.com> wrote:
> Please refer below link and check [subquery]
> .
>
> https://lucene.apache.org/solr/guide/6_6/transforming-result-documents.html
>
> On Wed, May 30, 2018 at 6:31 AM, kristaclaire14 <kc...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I want to query/find a value that may match on parent document fields or
>> child document fields. Is this possible using block join parent query
>> parser? How can I do this with solr nested documents? Here is the example
>> data:
>>
>> [{
>>     "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"
>>         }]
>>     },{
>>         "id":"2003",
>>         "path":"2.Project.Submission",
>>         "Submission_No":"7891-QWE",
>>         "_childDocuments_":[
>>         {
>>             "id":"3003",
>>             "path":"3.Project.Submission.Agency",
>>             "Agency_Cd":"QWE"
>>         }]
>>     }]
>> }]
>>
>> I want to retrieve all Projects with Project_Title:*QWE* OR
>> Submission_Submission_No:*QWE*. Thanks in advance.
>>
>>
>>
>> --
>> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>>
>
>
>
> --
> Regards,
>
> Aniket S. Khare

Re: Find value in Parent doc fields OR Child doc fields

Posted by Aniket Khare <an...@gmail.com>.
Please refer below link and check [subquery]
.

https://lucene.apache.org/solr/guide/6_6/transforming-result-documents.html

On Wed, May 30, 2018 at 6:31 AM, kristaclaire14 <kc...@gmail.com>
wrote:

> Hi,
>
> I want to query/find a value that may match on parent document fields or
> child document fields. Is this possible using block join parent query
> parser? How can I do this with solr nested documents? Here is the example
> data:
>
> [{
>     "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"
>         }]
>     },{
>         "id":"2003",
>         "path":"2.Project.Submission",
>         "Submission_No":"7891-QWE",
>         "_childDocuments_":[
>         {
>             "id":"3003",
>             "path":"3.Project.Submission.Agency",
>             "Agency_Cd":"QWE"
>         }]
>     }]
> }]
>
> I want to retrieve all Projects with Project_Title:*QWE* OR
> Submission_Submission_No:*QWE*. Thanks in advance.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>



-- 
Regards,

Aniket S. Khare

Re: Find value in Parent doc fields OR Child doc fields

Posted by Asher Shih <ca...@gmail.com>.
unsubscribe

On Tue, May 29, 2018 at 6:01 PM, kristaclaire14
<kc...@gmail.com> wrote:
> Hi,
>
> I want to query/find a value that may match on parent document fields or
> child document fields. Is this possible using block join parent query
> parser? How can I do this with solr nested documents? Here is the example
> data:
>
> [{
>     "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"
>         }]
>     },{
>         "id":"2003",
>         "path":"2.Project.Submission",
>         "Submission_No":"7891-QWE",
>         "_childDocuments_":[
>         {
>             "id":"3003",
>             "path":"3.Project.Submission.Agency",
>             "Agency_Cd":"QWE"
>         }]
>     }]
> }]
>
> I want to retrieve all Projects with Project_Title:*QWE* OR
> Submission_Submission_No:*QWE*. Thanks in advance.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Find value in Parent doc fields OR Child doc fields

Posted by Mikhail Khludnev <mk...@apache.org>.
 Project_Title:QWE {!parent which=path:1.Project v='Submission_No:QWE'}

fixing the quote

On Wed, May 30, 2018 at 4:01 AM, kristaclaire14 <kc...@gmail.com>
wrote:

> Hi,
>
> I want to query/find a value that may match on parent document fields or
> child document fields. Is this possible using block join parent query
> parser? How can I do this with solr nested documents? Here is the example
> data:
>
> [{
>     "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"
>         }]
>     },{
>         "id":"2003",
>         "path":"2.Project.Submission",
>         "Submission_No":"7891-QWE",
>         "_childDocuments_":[
>         {
>             "id":"3003",
>             "path":"3.Project.Submission.Agency",
>             "Agency_Cd":"QWE"
>         }]
>     }]
> }]
>
> I want to retrieve all Projects with Project_Title:*QWE* OR
> Submission_Submission_No:*QWE*. Thanks in advance.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>



-- 
Sincerely yours
Mikhail Khludnev

Re: Find value in Parent doc fields OR Child doc fields

Posted by Mikhail Khludnev <mk...@apache.org>.
q=Project_Title:QWE {!parent which=path:1.Project v='Submission_No:QWE}

On Wed, May 30, 2018 at 4:01 AM, kristaclaire14 <kc...@gmail.com>
wrote:

> Hi,
>
> I want to query/find a value that may match on parent document fields or
> child document fields. Is this possible using block join parent query
> parser? How can I do this with solr nested documents? Here is the example
> data:
>
> [{
>     "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"
>         }]
>     },{
>         "id":"2003",
>         "path":"2.Project.Submission",
>         "Submission_No":"7891-QWE",
>         "_childDocuments_":[
>         {
>             "id":"3003",
>             "path":"3.Project.Submission.Agency",
>             "Agency_Cd":"QWE"
>         }]
>     }]
> }]
>
> I want to retrieve all Projects with Project_Title:*QWE* OR
> Submission_Submission_No:*QWE*. Thanks in advance.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>



-- 
Sincerely yours
Mikhail Khludnev