You might try creating your whole transform as an SQL database view rather
than with the Solr transformer toolkit.
This would also make it easier to directly examine the data to be indexed.

Lance

-----Original Message-----
From: Julio Castillo [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 29, 2008 6:04 PM
To: solr-user@lucene.apache.org
Subject: RE: How to describe 2 entities in dataConfig for the DataImporter?

Thanks Shalin,
I tried putting everything under the same document (two different unrelated
entities), and got a bit further.

My problem now appears to be both of them stepping on each other due to "id"
conflicts. Currently my id is defined in my schema as <field name="id"
type="long" indexed="true" stored="true" required="true"/>

Do I have to create a new "id" field?

Thanks

** julio

-----Original Message-----
From: Shalin Shekhar Mangar [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2008 11:40 AM
To: solr-user@lucene.apache.org
Subject: Re: How to describe 2 entities in dataConfig for the DataImporter?

Hi Julio,

The first data-config is correct.

You're running DataImportHandler in debug mode which creates only the first
10 documents by default. You can also add count=N to index only the first N
documents. But this is intended only for debugging purposes. If you want to
do a full-import just use /dataimport?command=full-import. By default, a
full-import automatically cleans and commits.

Hope that helps.

On Thu, May 29, 2008 at 11:42 PM, Julio Castillo <[EMAIL PROTECTED]>
wrote:
> I have 2 dB tables unrelated to each other that I want to index.
>
> I have tried 2 approaches for specifying them in my data-config.xml file.
> None of them seem to work (it seems I can only get data for the first 
> one listed).
>
> CASE 1)
> <dataConfig>
>  <document name="test">
>    <entity name="owners" pk="id" query="....">
>      <field column="id" name="id"/>
>      <field column=name" name="userName"/>
>    </entity>
>    <entity name="vets" pk="id" query="....">
>      <field column="id" name="id"/>
>      <field column=name" name="userName"/>
>    </entity>
>  </document>
> </dataConfig>
>
> CASE 2)
> <dataConfig>
>  <document name="test-1">
>    <entity name="owners" pk="id" query="....">
>      <field column="id" name="id"/>
>      <field column=name" name="userName"/>
>    </entity>
>  </document>
>  <document name="test-2">
>    <entity name="vets" pk="id" query="....">
>      <field column="id" name="id"/>
>      <field column=name" name="userName"/>
>    </entity>
>  </document>
> </dataConfig>
>
> I ran the dataImporter as follows
> http://localhost:2455/solr/dataimport?command=full-import&debug=on&ver
> bose=t
> rue&clean=true&commit=true
>
> After running Case 1 the output only shows documents under entity:owners.
> And an empty reference to entity:vets (no data).
>
> After running Case 2, the output only shows documents under entity:owners.
> No references to entity:vets.
>
> In either case, I have commented out the entity:owners and I do see 
> the entity:vets data then.
>
> Thanks for your assistance
>
> Julio Castillo
>
>



--
Regards,
Shalin Shekhar Mangar.


          • Re: H... Noble Paul നോബിള്‍ नोब्ळ्
          • Re: H... Noble Paul നോബിള്‍ नोब्ळ्
          • RE: H... Julio Castillo
          • Re: H... Noble Paul നോബിള്‍ नोब्ळ्
          • Re: H... Noble Paul നോബിള്‍ नोब्ळ्
          • RE: H... Julio Castillo
          • Re: H... Shalin Shekhar Mangar
          • RE: H... Julio Castillo
          • Re: H... Shalin Shekhar Mangar
          • Re: H... Shalin Shekhar Mangar
  • RE: How to describe 2 ... Lance Norskog

Reply via email to