query range in multivalued date field

2011-01-27 Thread ramzesua

hi all. My query range for multivalued date field work incorrect.
My schema. There is field requestDate that have multivalued attr.:
fields   
   field name=id type=string indexed=true stored=true
required=true /
   field name=keyword type=text indexed=true stored=true /
   field name=count  type=float indexed=true stored=true /
   field name=isResult  type=int indexed=true stored=true
default=0 multiValued=true /
   field name=requestDate  type=date indexed=true stored=true
multiValued=true /
 /fields

Some data from the index:

doc 
  float name=count2.0/float 
  str name=idsale/str 
  arr name=isResultint1/intint1/int/arr 
  str name=keywordsale/str 
  arr
name=requestDatedate2011-01-26T08:18:35Z/datedate2011-01-27T01:31:28Z/date/arr
 
 /doc 
 doc 
  float name=count3.0/float 
  str name=idcoldpop/str 
  arr name=isResultint1/intint1/intint1/int/arr 
  str name=keywordcold pop/str 
  arr
name=requestDatedate2011-01-27T01:30:01Z/datedate2011-01-27T01:32:01Z/datedate2011-01-27T01:32:18Z/date/arr
 
 /doc 

I try to search some docs where date is in some range, for example,
http://localhost:8983/request/select?q=requestDate:[NOW/HOUR-1HOUR TO
NOW/HOUR]
There are no result. After some analyzing, I saw, that this range works only
for first item in the requestDate field, but don't filtered for another
items. Where is my mistake? Or SOLR can't filtered multivalued date fields?
Thanks
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/query-range-in-multivalued-date-field-tp2361292p2361292.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: query range in multivalued date field

2011-01-27 Thread Erick Erickson
Range queries work on multivalued fields. I suspect the date math
conversion is fooling you. For instance,NOW/HOUR first rounds down to
the current hour, *then* subtracts one hour.

If you attach debugQuery=on (or check the debug checkbox
in the admin full search page), you'll see the exact results of
the conversion, that may help.

Best
Erick

On Thu, Jan 27, 2011 at 5:15 AM, ramzesua michaelnaza...@gmail.com wrote:


 hi all. My query range for multivalued date field work incorrect.
 My schema. There is field requestDate that have multivalued attr.:
 fields
   field name=id type=string indexed=true stored=true
 required=true /
   field name=keyword type=text indexed=true stored=true /
   field name=count  type=float indexed=true stored=true /
   field name=isResult  type=int indexed=true stored=true
 default=0 multiValued=true /
   field name=requestDate  type=date indexed=true stored=true
 multiValued=true /
  /fields

 Some data from the index:

 doc
  float name=count2.0/float
  str name=idsale/str
  arr name=isResultint1/intint1/int/arr
  str name=keywordsale/str
  arr

 name=requestDatedate2011-01-26T08:18:35Z/datedate2011-01-27T01:31:28Z/date/arr
  /doc
  doc
  float name=count3.0/float
  str name=idcoldpop/str
  arr name=isResultint1/intint1/intint1/int/arr
  str name=keywordcold pop/str
  arr

 name=requestDatedate2011-01-27T01:30:01Z/datedate2011-01-27T01:32:01Z/datedate2011-01-27T01:32:18Z/date/arr
  /doc

 I try to search some docs where date is in some range, for example,
 http://localhost:8983/request/select?q=requestDate:[NOW/HOUR-1HOUR TO
 NOW/HOUR]
 There are no result. After some analyzing, I saw, that this range works
 only
 for first item in the requestDate field, but don't filtered for another
 items. Where is my mistake? Or SOLR can't filtered multivalued date fields?
 Thanks
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/query-range-in-multivalued-date-field-tp2361292p2361292.html
 Sent from the Solr - User mailing list archive at Nabble.com.