lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: search with Filter
Date Mon, 15 Sep 2008 15:30:50 GMT
Filters aren't really specified per field. All they are is a bitmask, one
bit per *document*. You can construct the filter any way you want, in your
case by inspecting the date-time field and passing it along with your query.
You can even combine several fields into one filter by twiddling the bits
as appropriate.

At least that's the general case. In your case, don't you just want a
>From the API:

*(String <>
String <> lowerTerm,
String <> upperTerm,
boolean includeLower, boolean includeUpper)

One other thing: Do you really need seconds? How about minutes? The
coarser your resolution, the better your performance. See also DateTools.


On Mon, Sep 15, 2008 at 11:17 AM, Dino Korah <> wrote:

> Hi All,
> I am trying to utilize Filter to see if I can get a bit more performance
> out
> of my application that searches over 100million document lucene index.
> On all my documents I have a two fields over which I will have to scope my
> searches. One is a date-time field (YYYYMMDDHHMMSS) and a user-id filed
> (number). How do I specify filter for a field. I feel that I can use
> BooleanFilter + RangeFilter (for date-time) + TermFilter (user-id).
> I couldnt figure out how to specify a Filter per field.
> Could someone point me in the right direction.
> Many thanks,
> Dino

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message