Here is how I have the field defined... see attachment. 
  
  
----- Original Message -----

From: "Erick Erickson" <erickerick...@gmail.com> 
To: "solr-user" <solr-user@lucene.apache.org> 
Sent: Thursday, December 8, 2016 10:44:08 AM 
Subject: Re: prefix query help 

You'd probably be better off indexing it as a "string" type given your 
expectations. Depending on the analysis chain (do take a look at 
admin/analysis for the field in question) the tokenization can be tricky 
to get right. 

Best, 
Erick 

On Thu, Dec 8, 2016 at 7:18 AM, KRIS MUSSHORN <mussho...@comcast.net> wrote: 
> Im indexing data from Nutch into SOLR 5.4.1. 
> I've got a date metatag that I have to store as text type because the data 
> stinks. 
> It's stored in SOLR as field metatag.date. 
> At the source the dates are formatted (when they are entered correctly ) as 
> YYYY-MM-DD 
> 
> q=metatag.date:2016-01* does not produce the correct results and returns 
> undesireable matches....2016-05-01 etc as example. 
> q={!prefix f=metatag.date}2016-01 gives me exactly what I want for one 
> month/year. 
> 
> My question is how do I chain n prefix queries together? 
> i.e. 
> I want all docs where metatag.date prefix is 2016-01 or 2016-07 or 2016-10 
> 
> TIA, 
> Kris 
> 

Attachment: field name.docx
Description: MS-Word 2007 document

Reply via email to