Try writing a few examples. Try christmas, easter, and memorial day.
-- Jack Krupansky
-----Original Message-----
From: Anurag Sharma
Sent: Sunday, November 9, 2014 12:54 PM
To: solr-user@lucene.apache.org
Subject: Re: Best way to map holidays to corresponding date
Not sure this is the correct way but can we use synonyms here
On Wed, Nov 5, 2014 at 6:14 PM, Jack Krupansky <j...@basetechnology.com>
wrote:
Unfortunately, a date is a non-analyzed field, so you can't do something
like a synonym.
Further, Holidays are repeating - every year - and the dates can vary, so
they won't match exactly.
Use an update request processor to examine the date field at values index
time and look up and store the holiday name in a text field so that you
can
do a query such as "holiday:easter". It could be a string field, but they
case would have to match exactly You could code this in a JavaScript
script
that has the logic or hard dates for various holidays using the stateless
script update processor.
-- Jack Krupansky
-----Original Message----- From: Patrick Kirsch
Sent: Wednesday, November 5, 2014 6:12 AM
To: solr-user@lucene.apache.org
Subject: Best way to map holidays to corresponding date
Hey,
maybe someone already faced the situation and could give me a hint.
Given one query includes "Easter" or "Sylvester" I search for the best
place to translate the string to the corresponding date.
Is there any solr.Mapping*Factory for that?
Do I need to implement it in a custom Solr Query Parser etc.?
Regards,
Patrick