You could change the query to escape these characters. Escaping was just
added in the RC5 release by Brian.
--Peter
On 5/27/02 5:08 PM, "Victor Hadianto" <[EMAIL PROTECTED]> wrote:
> 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,
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>