Jump to content

In over my head - need help with search algorithm


Recommended Posts

Hi all, 

 

I need some guidance and hoping some of you might be able to point me in the right direction. I am working on a project for a client that includes a very large database of business contacts and a simple one line search box. 

 

I will explain as best I can:

The database contains prefix, first name, last name, company name, company type (roofing, tiling, flooring...etc), address, city, county, zip code, phone number and other variables. 

 

The search box on the websites homepage is only one line. The pre-populated text says:

 

Enter Business type, city, county or zipcode.

 

The user is "supposed" to add a type of business (I.e. Roofing, tiling, dry walling ...etc) followed by either a city, a county or a zip code. 

 

I need to figure out how to take this text (I.e. Roofing macomb county, or, Roofing 48333, or Roofing Detroit) and first find all companies that match type (roofing) and then match either city, county or zipcode, depending on what the user enters. 

 

Traditionally, I have used multi-part search boxes, such as a drop down for company type, text box for city, county or zip, and assigned each as a search variable, easy stuff, but I am unsure as to how I would progress with a single text string that I'm not even sure how a customer will enter. They could, for example, type the zipcode or city first, followed by the company type (I.e. 48333 roofing) or they may not enter a company type at all, simply entering a zip code, in which case I'd have to be able to prompt them to add a company type as well so we know which companies to return.

 

Could anyone please give me some advice on how I should start on this? I have 2 weeks to complete the entire project and this is the only area I am unfamiliar with. The rest is just a lot of coding and pretty standard. 

 

Thank you so much in advance!

Edited by Jax2
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.