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 con <co...@gmail.com> on 2008/09/24 08:04:27 UTC
Error running query inside data-config.xml
Hi Guys
I am trying to take values by connecting two tables. My data-config.xml
looks like:
<dataConfig>
<dataSource ***** />
<document>
<entity name="emp" query="select * from EMPLOYEE">
<field name="features" column="EMPID" />
<entity name="grade" query="select * from EMP_GRADE, EMPLOYEE where
EMP_GRADE.EMPID='${emp.EMPID}'">
<field name="features" column="SALARY" />
</entity>
</entity>
</document>
</dataConfig>
If I try to index the values from a single table, it is working fine. Is
there anything wrong in the above configuration:
Thanks in advance
--
View this message in context: http://www.nabble.com/Error-running-query-inside-data-config.xml-tp19642540p19642540.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Error running query inside data-config.xml
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Looking at your data-config.xml, you are trying to index two columns both of
which are being sent to "features" field. The output from the
data-config.xml shows that it added 152 documents.
Try using the match all query *:* which should show all documents in the
index. You will need to modify the schema.xml to index the fields you need
from the DB.
On Wed, Sep 24, 2008 at 12:33 PM, con <co...@gmail.com> wrote:
>
>
> Hi
> I havnt changed the schema. For the time being i am simply following the
> default schema.xml inside conf directory.
> By error I meant no output values.
> But when I run http://localhost:8983/solr/dataimport?command=full-import,
> it
> shows that:
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">0</int>
> </lst>
>
> <lst name="initArgs">
> <lst name="defaults">
> <str name="config">/data-config.xml</str>
> </lst>
> </lst>
> <str name="command">full-import</str>
> <str name="status">idle</str>
> <str name="importResponse"/>
>
> <lst name="statusMessages">
> <str name="Total Requests made to DataSource">1</str>
> <str name="Total Rows Fetched">152</str>
> <str name="Total Documents Skipped">0</str>
> <str name="Full Dump Started">2008-09-24 11:50:53</str>
>
> <str name="">
> Indexing completed. Added/Updated: 152 documents.
> Deleted 0 documents.
> </str>
> <str name="Committed">2008-09-24 11:50:54</str>
> <str name="Optimized">2008-09-24 11:50:54</str>
> <str name="Time taken ">0:0:1.169</str>
> </lst>
>
> <str name="WARNING">
> This response format is experimental. It is likely to
> change in the
> future.
> </str>
> </response>
>
>
> So that means, as i understand, solr is able to find the responses. Also I
> ran the query externally through the query browser, that also running fine.
> But when i go and search it through the admin UI, no responce is displayed.
>
> Is there something i missed in the configuration file or something else:
>
> Expecting your reply/suggestion
> thanks
> con
> --
> View this message in context:
> http://www.nabble.com/Error-running-query-inside-data-config.xml-tp19642540p19643099.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
--
Regards,
Shalin Shekhar Mangar.
Re: Error running query inside data-config.xml
Posted by Noble Paul നോബിള് नोब्ळ् <no...@gmail.com>.
just paste the fields in your schema so that we can help you better
On Wed, Sep 24, 2008 at 12:33 PM, con <co...@gmail.com> wrote:
>
>
> Hi
> I havnt changed the schema. For the time being i am simply following the
> default schema.xml inside conf directory.
> By error I meant no output values.
> But when I run http://localhost:8983/solr/dataimport?command=full-import, it
> shows that:
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">0</int>
> </lst>
>
> <lst name="initArgs">
> <lst name="defaults">
> <str name="config">/data-config.xml</str>
> </lst>
> </lst>
> <str name="command">full-import</str>
> <str name="status">idle</str>
> <str name="importResponse"/>
>
> <lst name="statusMessages">
> <str name="Total Requests made to DataSource">1</str>
> <str name="Total Rows Fetched">152</str>
> <str name="Total Documents Skipped">0</str>
> <str name="Full Dump Started">2008-09-24 11:50:53</str>
>
> <str name="">
> Indexing completed. Added/Updated: 152 documents. Deleted 0 documents.
> </str>
> <str name="Committed">2008-09-24 11:50:54</str>
> <str name="Optimized">2008-09-24 11:50:54</str>
> <str name="Time taken ">0:0:1.169</str>
> </lst>
>
> <str name="WARNING">
> This response format is experimental. It is likely to change in the
> future.
> </str>
> </response>
>
>
> So that means, as i understand, solr is able to find the responses. Also I
> ran the query externally through the query browser, that also running fine.
> But when i go and search it through the admin UI, no responce is displayed.
>
> Is there something i missed in the configuration file or something else:
>
> Expecting your reply/suggestion
> thanks
> con
> --
> View this message in context: http://www.nabble.com/Error-running-query-inside-data-config.xml-tp19642540p19643099.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
--
--Noble Paul
Re: Error running query inside data-config.xml
Posted by con <co...@gmail.com>.
Hi
I havnt changed the schema. For the time being i am simply following the
default schema.xml inside conf directory.
By error I meant no output values.
But when I run http://localhost:8983/solr/dataimport?command=full-import, it
shows that:
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
</lst>
<lst name="initArgs">
<lst name="defaults">
<str name="config">/data-config.xml</str>
</lst>
</lst>
<str name="command">full-import</str>
<str name="status">idle</str>
<str name="importResponse"/>
<lst name="statusMessages">
<str name="Total Requests made to DataSource">1</str>
<str name="Total Rows Fetched">152</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2008-09-24 11:50:53</str>
<str name="">
Indexing completed. Added/Updated: 152 documents. Deleted 0 documents.
</str>
<str name="Committed">2008-09-24 11:50:54</str>
<str name="Optimized">2008-09-24 11:50:54</str>
<str name="Time taken ">0:0:1.169</str>
</lst>
<str name="WARNING">
This response format is experimental. It is likely to change in the
future.
</str>
</response>
So that means, as i understand, solr is able to find the responses. Also I
ran the query externally through the query browser, that also running fine.
But when i go and search it through the admin UI, no responce is displayed.
Is there something i missed in the configuration file or something else:
Expecting your reply/suggestion
thanks
con
--
View this message in context: http://www.nabble.com/Error-running-query-inside-data-config.xml-tp19642540p19643099.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Error running query inside data-config.xml
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Since you have not given any information about your schema, we cannot help
with the queries.
What do you mean by error running query? Do you get an exception or no
values for the inner entity's fields?
On Wed, Sep 24, 2008 at 11:34 AM, con <co...@gmail.com> wrote:
>
> Hi Guys
> I am trying to take values by connecting two tables. My data-config.xml
> looks like:
> <dataConfig>
> <dataSource ***** />
> <document>
> <entity name="emp" query="select * from EMPLOYEE">
> <field name="features" column="EMPID" />
> <entity name="grade" query="select *
> from EMP_GRADE, EMPLOYEE where
> EMP_GRADE.EMPID='${emp.EMPID}'">
> <field name="features"
> column="SALARY" />
> </entity>
> </entity>
> </document>
> </dataConfig>
>
>
> If I try to index the values from a single table, it is working fine. Is
> there anything wrong in the above configuration:
>
> Thanks in advance
> --
> View this message in context:
> http://www.nabble.com/Error-running-query-inside-data-config.xml-tp19642540p19642540.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
--
Regards,
Shalin Shekhar Mangar.