You can't tokenize the the search query if its on that field...using
maybe a per field analyzer and the keyword analyzer? Check em out if you
havn't.

On Fri, 2008-04-25 at 16:01 +0100, Chris Mannion wrote:
> 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,
> Field.Index.UN_TOKENIZED));
> 
> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to