Hi David,

I'd start by:

- having a look a the index with Luke (or via some code that just dumps the 
content of that created_date field), so I can be 100% sure that the right stuff 
is in it to begin with
- 0 results makes me think that index-time and search-time tokenization might 
be different, so I'd double-check that.

Otis 

--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch

----- Original Message ----
From: David Whalen <[EMAIL PROTECTED]>
To: solr-user <solr-user@lucene.apache.org>
Sent: Friday, October 26, 2007 10:37:14 AM
Subject: Date range problems


Hi All.

We're seeing a really interesting problem when searching by
date range.  

We have two fields of type "date" in our index (they are both
indexed and stored).  They are:

content_date
and
created_date

We can run any date-range query we want against content_date 
and we get expected results.  However, when we run similar
queries against created_date we get 0 results from the query
consistently.

Now, here's the interesting part -- if we do a plain search
without a date range, BUT sort by created_date desc we get 
properly sorted results.

So, it seems like the index works for sorting but not for
searching.  Does that make any sense?  Anyone have an ideas
on how we can diagnose this issue?

Here's the relevant block from our schema (before you ask):

   <field name="id" type="string" indexed="true" stored="true"/>
   <field name="content_date" type="date" indexed="true" stored="true"
 />
   <field name="media_type" type="string" indexed="true" stored="true"
 multiValued="true" />
   <field name="location" type="string" indexed="true" stored="true"
 multiValued="true" />
   <field name="country_code" type="string" indexed="true"
 stored="true" multiValued="true" />
   <field name="text" type="text" indexed="true" stored="false"
 multiValued="true"/>
   <field name="content_source" type="string" indexed="true"
 stored="true" />
   <field name="title" type="string" indexed="true" stored="true" />
   <field name="site_id" type="string" indexed="true" stored="false" />
   <field name="journalist_id" type="string" indexed="true"
 stored="false" />
   <field name="network" type="string" indexed="true" stored="false" />
   <field name="created_date" type="date" indexed="true" stored="true"
 />

TIA,

Dave W.




Reply via email to