|
|
|
|
![]() ![]() |
Feb 14 2006, 06:02 PM
Post
#1
|
|
|
Member - Active Contributor 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 ) ??
|
|
|
|
Feb 14 2006, 06:19 PM
Post
#2
|
|
|
Veteran Nut 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!" |
|
|
|
Feb 15 2006, 09:54 AM
Post
#3
|
|
|
Member - Active Contributor 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 |
|
|
|
Feb 15 2006, 11:21 AM
Post
#4
|
|
|
PESTICIDAL MANIAC 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 |
|
|
|
Feb 28 2006, 12:07 PM
Post
#5
|
|
|
Premium Member 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.
|
|
|
|
Feb 28 2006, 01:06 PM
Post
#6
|
|
|
[+] Graphic Designer [+] 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 |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 11th October 2008 - 09:27 AM |