oh. There is nothing wrong with indexing or querying.
Solr cannot store or return a document like

 <arr name="banner_type">
    <str>flash
         <arr name="size">
            <str>50x50</str>
            <str>100x100</str>
        </arr>
    </str>
    <str>gif
        <arr name="size">
            <str>50x50</str>
            <str>100x100</str>
        </arr>
    </str>
 </arr>

Solr/Lucene Document is not really an object tree. It is a flat object where
the values can be a single valued or it can be a collection type

But you can do something as follows

have fields like size_flash, size_gif and size_jpg and depending on the
banner type you can store them in appropriate fields

BTW
 <field name="size" column="size" />
can be shortened to
 <field column="size" />



On Fri, Oct 24, 2008 at 6:48 PM, Nick80 <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> below is a simplified copy of my data-config file:
>
> <dataConfig>
> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost/campaign" user="root" password=""/>
>        <document name="campaigns">
>                <entity name="campaign" query="SELECT * FROM campaigns WHERE
> deleted_at IS
> NULL">y
>                        <field column="id" name="id" />
>      <field column="name" name="campaign_name" />
>
>      <entity name="banner" query="SELECT * FROM banners WHERE
> campaign_id=${campaign.id}">
>         <field name="banner_type" column="banner_type" />
>         <entity name="size" query="SELECT * FROM banner_sizes WHERE
> banner_id=${banner.id}">
>                 <field name="size" column="size" />
>              </entity>
>      </entity>
>                </entity>
>         </document>
> </dataConfig>
>
> I have defined the following fields in schema.xml:
>
> <field name="id" type="string" indexed="true" stored="true" />
> <field name="campaign_name" type="string" indexed="true" stored="true" />
> <field name="banner_type" type="string" indexed="true" stored="true"
> multiValued="true" omitNorms="true" termVectors="true" />
> <field name="size" type="string" indexed="true" stored="true"
> multiValued="true" omitNorms="true" termVectors="true" />
>
> Hope that makes it a bit clearer. Thanks.
>
> Kind regards,
>
> Nick
> --
> View this message in context:
> http://www.nabble.com/How-to-search-a-DataImportHandler-solr-index-tp20120698p20149960.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


-- 
--Noble Paul

Reply via email to