Re: Postcode/zipcode search

2008-05-24 Thread Ian Holsman (Lists)
have you had a look at WOEID's ? https://developer.yahoo.com/geo/ http://where.yahooapis.com/v1/places.q('NW10%207NY') gives you details about the postcode, as well as a lat/long bounding box and the 'real' name of it (Willesden) in this case. http://where.yahooapis.com/v1/place/26556102/neig

Re: Postcode/zipcode search

2008-05-06 Thread mark harwood
Can you not convert all postcodes to coordinates and do actual distance-based matching? You will have to pay Royal Mail or 3rd party suppliers to get hold of the PAF data required for this geocoding (despite having funded this already as a UK tax payer- g) Cheers Mark - Original Messa

Re: Postcode/zipcode search

2008-05-06 Thread AJ Weber
Maybe I'm oversimplifying it, and maybe this isn't what you desire, but... What about breaking the postcode into two (or three) different fields? Seems easy to parse on the ingestion-side, as you just break the string at the "middle" space. Then store "postal_area", "postal_street", and option

RE: Postcode/zipcode search

2008-05-06 Thread Will Johnson
You could split up the field into 2 separate fields: Postcode:NW10 7NY -> post1:NW10 post2:7NY Then rewrite user's queries using the same logic: ie if the enter 1 term 'NW10' it gets rewritten to post1:NW10, if they enter 2 terms post1:NW10 AND post2:7NY. It also lets you do fuzzy search ie pos

Re: Postcode/zipcode search

2008-05-06 Thread Erick Erickson
Have you looked at PrefixQuery? If that doesn't work for you, could you give a few more examples of expected inputs and outputs? Best Erick On Tue, May 6, 2008 at 12:28 PM, Chris Mannion <[EMAIL PROTECTED]> wrote: > Hi all > > I've got a bit of a niggling problem with how one of my searches is >

Re: Postcode/zipcode search

2008-05-06 Thread Grant Ingersoll
You might have a look at using a phrase query when you have more than one term in the query in addition to your term query, but giving the phrase query more weight (i.e. give an exact match more weight) and keep your original tokenization process. Something like: "NW10 7NY"^5 OR NW10 OR 7NY