Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Need help to create Search Engine

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If this will be more than a simple application, you can use Lucene!
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What kind of data source is this - files? If so, in what format?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

At back end I have to find out which is street, which is city, which is state and so on



Why dont you just have an input field for each on the form instead of getting all tangled up in parsing. For state it makes sense to have a preset SELECT list of all the state abbreviations.

Bill
[ May 14, 2007: Message edited by: William Brogden ]
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 76070
362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's cute! "Swim across the Atlantic Ocean. 3,462 mi"
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic