This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Need help to create Search Engine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Need help to create Search Engine" Watch "Need help to create Search Engine" New topic
Author

Need help to create Search Engine

Rakesh Thawait
Greenhorn

Joined: Oct 05, 2006
Posts: 13
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?
rohit leeta
Ranch Hand

Joined: May 02, 2007
Posts: 49
If this will be more than a simple application, you can use Lucene!


<a href="http://www.java-forums.org" target="_blank" rel="nofollow">Java Forums</a>
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41034
    
  43
What kind of data source is this - files? If so, in what format?


Ping & DNS - my free Android networking tools app
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
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 ]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
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
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37884
    
  22
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)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
That's cute! "Swim across the Atlantic Ocean. 3,462 mi"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help to create Search Engine
 
Similar Threads
Help in Analysis and Design ?
JTable Cell Editor
mock Exam question help
DTD - parameter entity
Help needed in how to update info in a randomaccessfile