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 "Rajendran, Prabaharan" <Ra...@DNB.com> on 2016/07/14 11:38:05 UTC

Why Nested document 'child' entity query (iterative count)repeatedly executing?

Hi All,

I am trying to index nested document. While start full data-import (from UI) following options selected Verbose, Commit, Debug & Debug-Mode.

Raw Debug-Response shows that "child" entity query execute repeatedly. Kindly help me to understand this, how can I resolve this, am I missed anything?

Sample data-config.xml
<document name="companies">
                                <entity name="company" transformer="RegexTransformer" rootEntity="true"
                                query="SELECT * FROM COMPANY">
                                                <field column="ID" name="c_id"/>
                                                <field column="DEPARTMENT" name="c_department"/>

                                                <entity name="employee" child="true"
                                                query="SELECT * FROM EMPLOYEE
                                                WHERE com_employee_id = '${company.ID}'">
                                                                <field column="NAME" name="e_name"/>
                                                                <field column="EXPERIENCE" name="e_experience"/>
                                                </entity>
                                </entity>
</document>
------------------------------------------------------------------------------------------------------------------------------------
Raw Debug-Response:

"entity:company",
[
    "document#1",
    [
        "query",
        "SELECT * FROM COMPANY",

       "----------------------------------------",
        "transformer:RegexTransformer",
        [
          "entity:employee",
[
            "query",
            "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
                ]
        ]
    ],
"document#2",
    [
        "transformer:RegexTransformer",
        [
          "entity:employee",
          [
            "query",
            "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
            "query",
            "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
                ]
          ]
     ]
]

"document#3"
                "entity:employee",
                "query",
                "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
"query",
"SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
                "query",
                "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'"


Thanks,
Prabaharan

Re: Why Nested document 'child' entity query (iterative count)repeatedly executing?

Posted by Mikhail Khludnev <mk...@apache.org>.
It seems like debug reporting issue. It deserves a minor Jira.

On Thu, Jul 14, 2016 at 2:38 PM, Rajendran, Prabaharan <Ra...@dnb.com>
wrote:

> Hi All,
>
> I am trying to index nested document. While start full data-import (from
> UI) following options selected Verbose, Commit, Debug & Debug-Mode.
>
> Raw Debug-Response shows that "child" entity query execute repeatedly.
> Kindly help me to understand this, how can I resolve this, am I missed
> anything?
>
> Sample data-config.xml
> <document name="companies">
>                                 <entity name="company"
> transformer="RegexTransformer" rootEntity="true"
>                                 query="SELECT * FROM COMPANY">
>                                                 <field column="ID"
> name="c_id"/>
>                                                 <field column="DEPARTMENT"
> name="c_department"/>
>
>                                                 <entity name="employee"
> child="true"
>                                                 query="SELECT * FROM
> EMPLOYEE
>                                                 WHERE com_employee_id =
> '${company.ID}'">
>                                                                 <field
> column="NAME" name="e_name"/>
>                                                                 <field
> column="EXPERIENCE" name="e_experience"/>
>                                                 </entity>
>                                 </entity>
> </document>
>
> ------------------------------------------------------------------------------------------------------------------------------------
> Raw Debug-Response:
>
> "entity:company",
> [
>     "document#1",
>     [
>         "query",
>         "SELECT * FROM COMPANY",
>
>        "----------------------------------------",
>         "transformer:RegexTransformer",
>         [
>           "entity:employee",
> [
>             "query",
>             "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
>                 ]
>         ]
>     ],
> "document#2",
>     [
>         "transformer:RegexTransformer",
>         [
>           "entity:employee",
>           [
>             "query",
>             "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
>             "query",
>             "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
>                 ]
>           ]
>      ]
> ]
>
> "document#3"
>                 "entity:employee",
>                 "query",
>                 "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
> "query",
> "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'",
>                 "query",
>                 "SELECT * FROM EMPLOYEE WHERE com_employee_id = '1924'"
>
>
> Thanks,
> Prabaharan
>



-- 
Sincerely yours
Mikhail Khludnev