lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aruna Raghavan <>
Subject RE: Term
Date Wed, 27 Mar 2002 19:31:46 GMT
Thanks for the response. I think the reason my search worked was because
"object number" got indexed as "object" and the searcher searched for
"object" as well.

-----Original Message-----
From: []
Sent: Wednesday, March 27, 2002 1:31 PM
Subject: Re: Term


> Hi,
> While adding documents using something like the following-
> document.add(Field.Text("object number", m_strObjectNumber));
> I used a string "object number" as you can see. I can not find the 
> values for "object number" when I do a search. I am using a
> StandardAnalyzer. Any idea why this is happening?

You would need to pose a query like this

object number:54321

However this is parsed by the standard analyzer  as a query looking
for the term 'object' in the default field and looking
for the term '54321' in the field named 'number'.

There are three workarounds:
- change your fieldname to eg. objectnumber, and query by:
- use 'object number' as the default field for searching.
- construct the query without using the standard analyzer.

I think the best solution would be to change the fieldname
into something shorter like 'onr' which allows for easy querying.


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

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

View raw message