lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Mannion" <>
Subject Really dumb search problem
Date Fri, 25 Apr 2008 15:01:57 GMT
Hi All

I'm going to start this with an apology because, as you'll see below, I've
probably missed out something quite fundamental about how Lucene works.

However, I'll explain the problem, we have a system setup which indexes and
searches records about business properties.  One of the fields we index on
is the postcode (zip code).  When putting the records into the idex, the
postcode field is processed as follows -

inspectionDoc.add(new Field("postcode", postcode, Field.Store.YES,

When we search, we build a very simple query.  For example, if the user
enters M11 1LQ in the search box, then we'll build a query in the form of
"(postcode:(M11 1LQ) )"

However, the postcode search never returns any results.  Other fields we
search on, using more complex query strings seem to work well, but postcode
never finds anything.  I've tried outputting the contents of Documents found
by other searches to make sure the postcode values are going in correctly
and they're definitely being at least stored correctly if not indexed.

Has anyone got an ideas why such a simple search, which should pick up
several exact matches, doesn't pick up anything?  Any help, however
insultingly simple it might seem, will be gratefully received at this
point.  Thanks.

Chris Mannion

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message