lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gora Mohanty <>
Subject Re: modeling multiple values on 1:n connection
Date Sun, 23 Jun 2013 06:25:15 GMT
On 23 June 2013 01:31, Mysurf Mail <> wrote:
> I try to model my db using
> this<>example
> from solr wiki.
> I have a table called item and a table called features with
> id,featureName,description
> here is the updated xml (added featureName)
> <dataConfig>
>     <dataSource driver="org.hsqldb.jdbcDriver"
> url="jdbc:hsqldb:/temp/example/ex" user="sa" />
>     <document>
>         <entity name="item" query="select * from item">
>             <entity name="feature" query="select description,
> featureName as features from feature where item_id='${item.ID}'"/>
>         </entity>
>     </document>
> Now I get two lists in the xml element
> <doc>
> <arr name="featureName">
> <str>number of miles in every direction the universal cataclysm was
> gathering</str> <str>All around the Restaurant people and things relaxed
> and chatted. The</str> <str>- Do we have... - he put up a hand to hold back
> the cheers, - Do we</str> </arr> <arr name="description">
> <str>to a stupefying climax. Glancing at his watch, Max returned to the
> stage</str> <str>air was filled with talk of this and that, and with the
> mingled scents of</str> <str>have a party here from the Zansellquasure
> Flamarion Bridge Club from</str>
> </arr>.
> </doc>
> But I would like to see the list together (using xml attributes) so that I
> dont have to join the values.
> Is it possible?

While it is not clear to me what you are asking, I am
guessing that you do not want the featureName and
description fields to appear as arrays. This is happening
because you have defined them as multi-valued in the
Solr schema. What exactly do you want to "join" here?


View raw message