lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Steichen" <te...@net-frame.com>
Subject Re: Searching in date ranges
Date Tue, 29 Oct 2002 15:56:34 GMT
Peter,

I'm not sure if I'm doing it right, but I use a Text Field (rather than
Keyword) for my (string-based) date which allows me to use wildcards (such
as date:200210* for all documents published in October) as well as range
queries (like date:[20021001 - 20021031].  Does that make sense?

Regards,

Terry

----- Original Message -----
From: "Peter Carlson" <carlson@bookandhammer.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Tuesday, October 29, 2002 10:44 AM
Subject: Searching in date ranges


> Hi Kajal,
>
> When you create you document, create a date field. The data you put in
> that date field will be a Field.Keyword(dateString)
>
> Note when you convert the date to a string, make sure that it is in the
> format yyyyMMdd
>
> Then you can use the built-in query parser range search tokens [ ].
>
> So an example search would be
>
> [20020101 - 20021028]
>
> This would search from jan 1, 2002 to oct 28, 2002.
>
> Note that you must have a space on either side of the -
>
> There are nicer ways to do it that don't have these limitations, but
> this is the fastest.
>
> I hope this helps.
>
> Also, please use more descriptive subject lines.
>
> --Peter
>
> On Tuesday, October 29, 2002, at 07:19 AM, Murthy, Suryanarayana (MED,
> TCS) wrote:
>
> > Hi Kelvin,
> > Could you please tell me the steps how to implement search engine for
> > the
> > intranet site with Lucene. I have gone through the documentation at the
> > site.
> > This is a starting problem for me.
> >
> > Thanks & Regards,
> > Murthy
> >
> > -----Original Message-----
> > From: Kelvin Tan [mailto:kelvin-lists@relevanz.com]
> > Sent: Tuesday, October 29, 2002 10:22 AM
> > To: Lucene Users List
> > Subject: Re: Urgent
> >
> > Kajal,
> >
> > Index the date fields using Field.Keyword, and use a DateFilter to
> > limit
> > the results you need.
> >
> > Regards,
> > Kelvin
> >
> >
> > On Tue, 29 Oct 2002 14:33:43 +0530, kbharwada@eq-technologic.com wrote:
> >> Hi
> >>
> >> I would like to implement a search with date range. Can anyone
> >> explain how
> >> do i go about implementing this. I have enabled search on our
> >> intranet site
> >> and want to make changes to results.jsp so as to include the date
> >> option as
> >> well.
> >>
> >> Kajal
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:   <mailto:lucene-user-
> >> unsubscribe@jakarta.apache.org>
> >> For additional commands, e-mail: <mailto:lucene-user-
> >> help@jakarta.apache.org>
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message