I know I can have multi value on them but that doesn't let me see that
a showing instance happens at a particular time on a particular
channel, just that it shows on a range of channels at a range of times

Starting to think I will have to either store a formatted string that
combines them or keep it flat just for indexing, retrieve ids and use
them to get data out of the RDBMS


On 24 Aug 2011, at 23:09, dan whelan <d...@adicio.com> wrote:

> You could change starttime and channelname to multiValued=true and use these 
> fields to store all the values for those fields.
>
> showing.movie_id and showing.id probably isn't needed in a solr record.
>
>
>
> On 8/24/11 7:53 AM, Zac Tolley wrote:
>> I have a very scenario in which I have a film and showings, each film has
>> multiple showings at set times on set channels, so I have:
>>
>> Movie
>> -----
>> id
>> title
>> description
>> duration
>>
>>
>> Showing
>> -----
>> id
>> movie_id
>> starttime
>> channelname
>>
>>
>>
>> I want to know can I store this in solr so that I keep this stucture?
>>
>> I did try to do an initial import with the DIH using this config:
>>
>> <entity name="movie" query="SELECT * from movies">
>>    <field column="ID" name="id"/>
>>    <field column="TITLE" name="title"/>
>>    <field name="DESCRIPTION" name="description"/>
>>
>>    <entity name="showing" query="SELECT * from showings WHERE movie_id = ${
>> movie.id}">
>>      <field column="ID" name="id"/>
>>      <field column="STARTTIME" name="starttime"/>
>>      <field column="CHANNELNAME" name="channelname"/>
>>    </entity>
>> </entity>
>>
>> I was hoping, for each movie to get a sub entity with the showing like:
>>
>> <doc>
>>    <str name="title">.....</str>
>>    <showing>
>>      <str name="channelname".....
>>
>>
>>
>> but instead all the fields are flattened down to the top level.
>>
>> I know this must be easy, what am I missing... ?
>>
>

Reply via email to