lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Outar" <>
Subject Range Query failing
Date Thu, 21 Nov 2002 14:39:37 GMT

	I have the following code that I know should return results but it is not,
does anything look odd with the following code?

        Term start = new Term(this.MODIFIED_DT,
        Term end = new Term(this.MODIFIED_DT, DateField.dateToString(to));
        RangeQuery q = new RangeQuery(start,end,true);
        Hits h =;
        return this.buildReturnArray(h);

The query formed looks like this:


My client code looks like this:

            String temp[] =  s.dateRangeQuery
            (new Date(f.lastModified()), new Date(f2.lastModified()));

Where f and f2 are whose lastModified dates have been indexed
in the following field:

  doc.add(new Field(MODIFIED_DT,
            DateField.timeToString(f.lastModified()), true, true, true));

Although tokenize is set to true, no tokeninging takes place, it's a hack to
allow for case insensitive searching using the following analyzer:

   public TokenStream tokenStream(String field, final Reader reader) {
        // do not tokenize any field
        TokenStream t = new CharTokenizer(reader) {
            protected boolean isTokenChar(char c) {
                return true;
        //case insensitive search
        t = new LowerCaseFilter(t);

        return t;

Let me know if I am doing something wrong.



-----Original Message-----
From: Craig Walls []
Sent: Thursday, November 21, 2002 9:16 AM
To: Lucene Users List
Subject: Re: Fun project?

I've been toying with a similar idea for a couple of months now. Very
similar to
what you describe except that the app would be focused on indexing and
GEDCOM (genealogy data) files in a P2P network.

My plan is to use Lucene to index the GEDCOM files with searchable fields
such as
surname, location (of birth, marriage, death, etc) and dates of various
events in
an individual's life. The client itself would probably be a Swing app, but
been tinkering with Thinlets lately and they're starting to appeal to me.
Finally, I had planned on using JXTA to implement the P2P part. Mostly
that's all I know about and partly because I have a friend who authored a
book on
JXTA that I can annoy with questions if necessary. (Incidentally--and
off-topic, in case anyone wants to try something like this with JXTA, let me
you some headache: I recommend against using Peer Resolver for performing
the only *sorta* works. A better choice, according to my author
would be propogate pipes, but I've not tried this yet.)

"Robert A. Decker" wrote:

> I wish I had time to work on this for fun, but I was thinking about what
> could be a fun lucene project...
> One could build a peer-to-peer document search application. Each client
> would index the documents on its harddrive, or documents in a particular
> directory. When the user at the computer does a search it will look at the
> documents on its harddrive, but also send out a request for the search on
> the P2P network.
> First though, are there any P2P java frameworks out there? One could build
> one, perhaps with OpenJMS, but it would be nice if one already existed.
> Hmm... if anyone else thinks this would be cool I'd be willing to work on
> this with you.
> thanks,
> Robert A. Decker
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message