However, you probably will still need to convert your dates into
strings as well to match people's search expectation, as the date
fields do not store _english_ month names internally.

So, you will want to have a secondary field that expands 2018-02-31
into "February 2018" (and "Feb 2018"?) including the analysis pipeline
that does lowercasing.

Regards,
   Alex.

On 16 August 2018 at 10:37, Shawn Heisey <apa...@elyograg.org> wrote:
> On 8/16/2018 7:48 AM, Christopher Schultz wrote:
>> I haven't actually tried this, yes, but from the docs I'm guessing that
>> I can't search for a DOB using e.g. 2018-08-16 but instead I need to
>> search using 2018-08-16T00:00:00 plus maybe "Z" at the end for the TZ.
>>
>> No user is ever going to do that.
>
> If you use the field class called DateRangeField, instead of the trie or
> point classes, you can get what you're after.
>
> It allows both searching and indexing dates as vague as "2018".
>
> https://lucene.apache.org/solr/guide/7_4/working-with-dates.html
>
> For an existing index, you will have to change the schema and completely
> reindex.
>
> Thanks,
> Shawn
>

Reply via email to