lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zqzuk <ziqi.zh...@hotmail.com>
Subject ranged queries concerning 2 fields, each are multivalued
Date Tue, 04 Mar 2008 16:43:14 GMT

Hi all, in my application I need to index some seminar data. The basic
assumption is that each seminar can be allocated to multiple time slots,
with an start time and an end time. For example on 1st March it is allocated
to 14:00 to 16:00 ; then on 1st April it is reallocated to 10:00 - 11:30.
The typical ranged query I want to do is "find if there are any seminars
happening at 12.00, i.e.,  start time<12.00< end time"

I have these following lines in my schema:

   <field name="start"  type="sfloat" indexed="true" stored="true"
multiValued="true"/>
   <field name="end"  type="sfloat" indexed="true" stored="true"
multiValued="true"/>

And example data Seminar ID=1, start:10.0 hr end 11.5 hr; and start: 14.0 hr
and end 16.0 hr.

  <field name="start">10.0</field>
  <field name="end">11.5</field>
  <field name="start">14.0</field>
  <field name="end">16.0</field>

however this does not work for the query " start<12.0<end"  - it finds the
example data above, which is incorrect.  This is because the "start" value
is not "glued" to the specific "end" value. 

Is there anyway to achieve this? by schema, or data... sorry about the odd
example but we do need to model our data in such way in our application.

Many thanks in advance!

-- 
View this message in context: http://www.nabble.com/ranged-queries-concerning-2-fields%2C-each-are-multivalued-tp15831403p15831403.html
Sent from the Solr - User mailing list archive at Nabble.com.


Mime
View raw message