lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: Term
Date Wed, 27 Mar 2002 19:30:46 GMT

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

View raw message