I have jsp page where user can enter their search parameter, search parameter can be any combination of street, city, state and country (USA only). At back end I have to find out which is street, which is city, which is state and so on, and then call the appropriate method. How can I do this without using database?
Sounds like the search on Google Maps. This zip and street gets my block: "18411 carnation" I'd be tempted to just use Google Maps. They have APIs and easy "mash up" integration.
I'm not sure about the "without database" requirement. That probably makes it pretty near impossible.
You can purchase products that wrap a database from the US Postal Service that knows every deliverable address in the country. We use them to "standardize" addresses before mailing. Send enough mail and it saves millions on postage.
Lucene will indeed search an index, but you have to build the index. You'd need that list of all deliverable addresses to build it.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Google Maps? Do you know what happens if you try to get from Washington DC to London? It tells you how to drive as far as the harbour at NYC, then you continue in France. In between, it suggests swimming.
Joined: Jan 29, 2003
That's cute! "Swim across the Atlantic Ocean. 3,462 mi"