Jump to content
xisto Community
Sign in to follow this  
marretas

Need Help With Multiple Keywords In A Search Engine

Recommended Posts

Well, there is the basic logic set.To search for something using DIFFERENT keywords, then put into the Google search field OR (must be caps) between each keyword. Example:dark blue OR navy blueWill bring up results with the keywords Dark Blue and those with Navy Blue, but not togather.To search for something using EXACT keywords, then put DOUBLE QUOTATION MARKS around your phrase. Example:"hello world!"

Share this post


Link to post
Share on other sites

lol , thanks twitch but i've explained rong.i'm Builiding a search engine, my own and unique search engine.I've built a form just to add new items to database . The form has : #1 field = name of the website #2 field = description #3 field = Keywords ( When user types something in main form to search the engine will get data to this field in database) #4 field = Url Now imagine that i've several keywords inside #3 field, look to the e.g. name : Xisto description : free webhost , supports php , mysql etc.... Keyword : PHP, Mysql, Free, Free Webhost url : http://forums.xisto.com/ Now when the user or me types in the main form a word for example: "PHP Mysql" the script goes to database to #field "keywords" and search for "PHP MYSQL", has you see PHP and Mysql Are separated by commas inside the field, but it wont show results because i've typed "PHP Mysql" and He only can return results if i Type PHP Or Mysql in diffrent searches. If i have several words inside a field the search engine only can return results if i type exaclty words inside the #field. E.g "PHP, Mysql, Free, Free Webhost ";The question is if anyone know how to build a search engine using multiple keywords , would you help me ? I only need the SQL code. Help me i'm stuck B)

Share this post


Link to post
Share on other sites

This is just generalised, there's more things that you may consider doing.First thing is, making sure that what you store can be consistent with what a user searches. e.g. having case sensitive is not a good idea, so it'd be best that keywords be stored lowercase and user's input will be converted to lowercase and searched in that form.What you need to do is manipulate your string you're given and working on your method for searching e.g.First search should be for the whole string php mysql, store the results of something that can be compared, e.g. the URL or something that is different from other entries but means only that entry. If stored in a database, what separates it from the rest so that it is different to the others listed in it.Once that check is over, whether it found anything or not, continue searching, this time splitting the string and searching for just php only, do the similar to the first step, then do the same with mysql.Next is comparing your results and picking which is better to serve, e.g. the first search contained the string as is, so should probably be considered the choice.You'll then look at the results of just php and just mysql, you'll compare them to see if they had same results (entries), if they do, they should be next to show.Then you can decide showing the individual searches of just php and just mysql afterwards.There's a lot more to this, but that's just the general idea, you can decide on how to handle this if you like and there's a lot more behind the scene things you would do too, just make sure entries don't double up.Cheers,MC

Share this post


Link to post
Share on other sites

Thanks Twitch, that helped me out! I have more problems trying to search for stuff because things get seperated or something. Even in the advanced search option it only gives you one field to work in and if you have more than one thing to look for your in trouble, so that really helped.

Share this post


Link to post
Share on other sites

you can also use this technique, while searching:--> type into google your search terms like (without quotes):"photoshop tutorials"- you will get all the stuff toghether or separated--> now if you use minus symbol "-":"photoshop -tutorialsyou will get results related to photoshop but not tutorials(this is very usegfull if you want to limit your search to more relevant responses, you can add as many as you like minuses and keywords separated by space, and narrow your search results)--> if you use plus symbol "+":"photoshop +tutorials"you will get only separated keywords on the same page

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.