lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Victor Hadianto <vict...@nuix.com.au>
Subject Re: Problem with Field.Keyword
Date Tue, 28 May 2002 00:08:41 GMT
On Fri, 24 May 2002 02:22, you wrote:
> > field. If I store
> > this field as Text I can search and find the document but I
> > couldn't delete
> > it using the following:
> >
> > indexReader.delete(new Term("id", "<3D044FA2@mail.totalise.co.uk>");
> >
> > This will return 0.
> >
> > If I store the id as a keyword, I couldn't even search the field.


Found what the problem is! The mole turn out to be QueryParser.

I wrote a simple test program that creates a document with a bunch of fields 
and data then query against the index.

QueryParser changes the term that I entered ie:

Query: 1@1
Searching for: "1 1"

Query: 1@1.1
Searching for: 1@1.1

Query: <1@1.1>
Searching for: 1@1.1


As you can see 1@1 -> 1 1, <1@1.1> -> 1@1.1

Arggh ... no wonder searching based on the message id does not work. 
QueryParser strips the < and > from my query. grr grr.....

Anyway after a nano-second of soul searching I can see why query parser does 
this. Seems to me like I have to construct my own query.

Regards,
-- 
Victor Hadianto

--
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