Juidoo - there's no field wildcarding in Solr as your example shows.

You might want to consider building a document for each movie time that includes all the information you need to search on: times, movie name, and other details.

Otherwise you need a join operation to search across related documents, something you may be familiar with from relational databases that Solr is only just now getting some support for in new development.

-Mike

On 6/11/2011 5:02 PM, Judioo wrote:
Hi All,

Question on best methods again :)

I have the following type of document.

<film>
   <title>Tron</film>
   <times>
     <time start='2010-09-23T12:00:00Z' end='2010-09-23T1430:00:00Z'
theater_id='445632'/>
     <time start='2010-09-23T15:00:00Z' end='2010-09-23T1730:00:00Z'
theater_id='445633'/>
     <time start='2010-09-23T18:00:00Z' end='2010-09-23T2030:00:00Z'
theater_id='445634'/>
   </times>
   .....
</film>

where theater identifies the place where the film is showing. Each theater
is stored in another document. I want to store the timings in the same
document as the film details. This is so I can perform a range search like

( type:film AND start:[ NOW TO * ] AND end:[NOW TO *] )

i.e. give me all the films that are scheduled to start in the future.

I was hoping I could submit a document like the following:

<doc>
   <field name="id">12345-67890-12345</field>
   <field name="title">Tron</field>
   <field name="445632_start">2010-09-23T12:00:00Z</field>
   <field name="445632_end">2010-09-23T1430:00:00Z</field>
   <field name="445633_start">2010-09-23T15:00:00Z</field>
   <field name="445633_end">2010-09-23T1730:00:00Z</field>
   <field name="445634_start">2010-09-23T18:00:00Z</field>
   <field name="445634_end">2010-09-23T2030:00:00Z</field>
   ....
</doc>


My assumption is that I could then perform a wildcard date range search like

( type:film AND *_start:[ NOW TO * ] AND *_end:[NOW TO *] )

Using the attribute name "<theater_id>_start|end"  as an indicator to the
theater. However I do not think date ranges support this.

Can ANYONE suggest a method to accomplish this with examples?


Thank you in advance.


Reply via email to