lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Carlson <carl...@bookandhammer.com>
Subject Re: Problem with Field.Keyword
Date Tue, 28 May 2002 05:27:40 GMT
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" <victorh@nuix.com.au> 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", "<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,


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