You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jon Baer <jo...@gmail.com> on 2008/08/20 23:21:33 UTC
Recognizing date inputs
Hi,
(Im sure this was asked before but found nothing on markmail) ...
Wondering if Solr can handle this on its own or if something needs to
be written ... would like to handle recognizing date inputs to a
search box for news articles, items such as "August 1","August 1st" or
"08/01/2008" ... its a bit different than synonym like handling in
that I have to transform the query to a specific field. Any thoughts?
Thanks.
- Jon
Re: Recognizing date inputs
Posted by Chris Hostetter <ho...@fucit.org>.
: (Im sure this was asked before but found nothing on markmail) ... Wondering if
: Solr can handle this on its own or if something needs to be written ... would
: like to handle recognizing date inputs to a search box for news articles,
: items such as "August 1","August 1st" or "08/01/2008" ... its a bit different
: than synonym like handling in that I have to transform the query to a specific
: field. Any thoughts?
it's been discussed, but nothing's been implemented ... the "right" way to
do it in my mind is to change the way IndexSchema works so that any
FieldType class can have analyzers (right now TextField is special) and
then we can string together together all sorts of interesting TokenFilters
as part of a query analyzer in front of numeric and date field types --
like a series of TokenFilters that check shingles of tokens against
various SimpleDateFormat patterns, and converts to an internal date if it
matches ending with a filter that ignores anything which isn't a date.
-Hoss