Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Need Help With Multiple Keywords In A Search Engine
marretas
post Feb 14 2006, 06:02 PM
Post #1


Member - Active Contributor
Group Icon

Group: Members
Posts: 98
Joined: 27-January 06
Member No.: 10,907



Anyone knows how to the search engine search for several keywords inside the same field separated by "," ( commas ) ??

Go to the top of the page
 
+Quote Post
twitch
post Feb 14 2006, 06:19 PM
Post #2


Veteran Nut
Group Icon

Group: Members
Posts: 527
Joined: 4-October 05
From: UK
Member No.: 8,895



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 blue

Will 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!"
Go to the top of the page
 
+Quote Post
marretas
post Feb 15 2006, 09:54 AM
Post #3


Member - Active Contributor
Group Icon

Group: Members
Posts: 98
Joined: 27-January 06
Member No.: 10,907



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 : Astahost
description : free webhost , supports php , mysql etc....
Keyword : PHP, Mysql, Free, Free Webhost
url : www.astahost.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 biggrin.gif
Go to the top of the page
 
+Quote Post
mastercomputers
post Feb 15 2006, 11:21 AM
Post #4


PESTICIDAL MANIAC
Group Icon

Group: Members
Posts: 626
Joined: 1-September 04
From: Auckland, New Zealand
Member No.: 27



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
Go to the top of the page
 
+Quote Post
lonebyrd
post Feb 28 2006, 12:07 PM
Post #5


Premium Member
Group Icon

Group: Members
Posts: 302
Joined: 23-February 06
From: Northeastern Connecticut USA
Member No.: 11,487



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.
Go to the top of the page
 
+Quote Post
finaldesign
post Feb 28 2006, 01:06 PM
Post #6


[+] Graphic Designer [+]
Group Icon

Group: Members
Posts: 614
Joined: 6-April 05
From: Croatia
Member No.: 3,666



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 -tutorials
you 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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Do Google Search Better Than Yahoo?(15)
  2. Windows Live Search(14)
  3. Simple Java Question(3)
  4. Homepages Friends(5)
  5. Download From Ftpz, Using Ftp Search Sitez(0)
  6. Mysql Multiple Tables(1)
  7. Singingfish(3)
  8. Live Search Webmaster Center(1)
  9. Yahoo! Search Boss(5)
  10. Google- Changing The Search Preferences!(3)
  11. MySQL, Multiple Tables(24)
  12. Search Engine Keyword Position(0)
  13. Get Paid To Search Yahoo!(10)
  14. Mysql Storage Engine Error 28(5)
  15. Multiple Versions Of Ie(7)
  1. New Text Based Game Maker(12)
  2. How Search Engines Operate(6)
  3. Blingo Search Engine(3)
  4. Spider Simulator Tool(0)
  5. Add A Search Box To My Web Site(10)
  6. Tekken 1-5(16)
  7. Use Of Xml Properties File For One Key - Multiple Value Mapping(0)
  8. Google Adsense Tips(1)
  9. Url Rewriting Tool(0)
  10. Search Engine Website - What Makes Them Famous ?(8)
  11. Cutenews 1.4.5 Security Alert Regarding Search.php(1)
  12. MSN Search In 2 Years(14)
  13. Which Search Engine Do You Use The Most?(120)
  14. Copernic Agent(6)
  15. Make Your Site Search Engine Friendly: mod_rewrite(8)


 



- Lo-Fi Version Time is now: 11th October 2008 - 09:27 AM