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", "<[EMAIL PROTECTED]>");
> >
> > 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: [EMAIL PROTECTED]
Searching for: [EMAIL PROTECTED]

Query: <[EMAIL PROTECTED]>
Searching for: [EMAIL PROTECTED]


As you can see 1@1 -> 1 1, <[EMAIL PROTECTED]> -> [EMAIL PROTECTED]

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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to