Re: full text search question
Laura did this work... inquiring minds want to know :) On Wed, 29 Sep 2004 13:36:40 -0400, Wesley Furgiuele [EMAIL PROTECTED] wrote: Laura: Perhaps the - is acting like a Boolean operator. What if you put double quotes around your search phrase: SELECT * FROM metadata WHERE MATCH( type ) AGAINST ( '+XY-11443' IN BOOLEAN MODE ); Wes On Wed, 29 Sep 2004 13:22:54 -0400, Laura Scott [EMAIL PROTECTED] wrote: Hello, I have a questions with limitations/restrictions that are around for full text search. I have a field with data like XY-11443;. and I need to find the record. The original developer was using full text search and says that all was working before the task switched hands. The basic query is select * from metadata where match(type) against ('+XY-11443' in boolean mode); This query spins through all of my records and gives no results. However, if I remove the XY- and just do ('+11443' in boolean mode) I get an immediate and correct result. I believe there is something going on with the '-' in the string that is causing trouble - like maybe a stop word or something - but can't find exactly what is going on and more importantly HOW TO FIX IT Any help would be awesome! Laura -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: full text search question
GH schrieb: Laura did this work... inquiring minds want to know :) Laura: Perhaps the - is acting like a Boolean operator. What if you put double quotes around your search phrase: SELECT * FROM metadata WHERE MATCH( type ) AGAINST ( '+XY-11443' IN BOOLEAN MODE ); Or.. the - is possibly supposed to be escaped? Let's take a look at the documentation ;) Bye Fred -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
full text search question
Hello, I have a questions with limitations/restrictions that are around for full text search. I have a field with data like XY-11443;. and I need to find the record. The original developer was using full text search and says that all was working before the task switched hands. The basic query is select * from metadata where match(type) against ('+XY-11443' in boolean mode); This query spins through all of my records and gives no results. However, if I remove the XY- and just do ('+11443' in boolean mode) I get an immediate and correct result. I believe there is something going on with the '-' in the string that is causing trouble - like maybe a stop word or something - but can't find exactly what is going on and more importantly HOW TO FIX IT Any help would be awesome! Laura -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: full text search question
Laura: Perhaps the - is acting like a Boolean operator. What if you put double quotes around your search phrase: SELECT * FROM metadata WHERE MATCH( type ) AGAINST ( '+XY-11443' IN BOOLEAN MODE ); Wes On Wed, 29 Sep 2004 13:22:54 -0400, Laura Scott [EMAIL PROTECTED] wrote: Hello, I have a questions with limitations/restrictions that are around for full text search. I have a field with data like XY-11443;. and I need to find the record. The original developer was using full text search and says that all was working before the task switched hands. The basic query is select * from metadata where match(type) against ('+XY-11443' in boolean mode); This query spins through all of my records and gives no results. However, if I remove the XY- and just do ('+11443' in boolean mode) I get an immediate and correct result. I believe there is something going on with the '-' in the string that is causing trouble - like maybe a stop word or something - but can't find exactly what is going on and more importantly HOW TO FIX IT Any help would be awesome! Laura -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Full Text Search Question
Hi! On Apr 03, Oson, Chris M. wrote: Hello, I have a site that I'm trying to implement a search engine on existing and archived news stories on a medium text datatype in a database. I read the documentation and got it running, but unless I missed something it's not doing what I want it to do. For example, if I put in the keywords [Alpine Fire], it will return all stories with Alpine Fire in it. That is what I want, but if there's another story about a fire, the search will return that also. Or if there's a story about an incident on Alpine street, that will also be returned. What I want is only stories that contain the keywords [Alpine Fire]. Is there a way to do that with a full text search? I'd rather not have to do a search using [LIKE '%Alpine Fire%'] because that doesn't seem like the most efficient way to do a search. chris Until 4.0 MySQL will have no native support for phrase searching (it's what you need). You can work around this with SELECT ... WHERE MATCH col AGAINST ('Alpine Fire') and col LIKE '%Alpine Fire%' This should be pretty fast, as the main filtering would be done by MATCH (be sure to verify this with EXPLAIN, though). But even without LIKE, stories about 'Alpine Fire' will have higher relevance and will be returned first, so simple LIMIT will help to distinguish between relevant (about 'Alpine Fire') and not relevant (about Alpine street or about a fire) stories. That's how most search engines work. Regards, Sergei -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Full Text Search Question
Hello, I have a site that I'm trying to implement a search engine on existing and archived news stories on a medium text datatype in a database. I read the documentation and got it running, but unless I missed something it's not doing what I want it to do. For example, if I put in the keywords [Alpine Fire], it will return all stories with Alpine Fire in it. That is what I want, but if there's another story about a fire, the search will return that also. Or if there's a story about an incident on Alpine street, that will also be returned. What I want is only stories that contain the keywords [Alpine Fire]. Is there a way to do that with a full text search? I'd rather not have to do a search using [LIKE '%Alpine Fire%'] because that doesn't seem like the most efficient way to do a search. chris - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Full Text Search Question
To do a full word match like you are wanting, you would need to break up the sql query to do this: ... WHERE field LIKE "%word1%" AND field LIKE "%word2%" ... That is how you have to do it if you are not using one of the latest 3.23 versions of mysql. If you have a newer version of mysql, check out this page for more info http://www.mysql.com/doc/M/y/MySQL_full-text_search.html On 4/3/01 11:07 AM, "Oson, Chris M." [EMAIL PROTECTED] wrote: Hello, I have a site that I'm trying to implement a search engine on existing and archived news stories on a medium text datatype in a database. I read the documentation and got it running, but unless I missed something it's not doing what I want it to do. For example, if I put in the keywords [Alpine Fire], it will return all stories with Alpine Fire in it. That is what I want, but if there's another story about a fire, the search will return that also. Or if there's a story about an incident on Alpine street, that will also be returned. What I want is only stories that contain the keywords [Alpine Fire]. Is there a way to do that with a full text search? I'd rather not have to do a search using [LIKE '%Alpine Fire%'] because that doesn't seem like the most efficient way to do a search. chris - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Full Text Search Question
My apologies, I didn't clarify that I *was* using a full-text search. -Original Message- From: Lindsay Adams [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 11:52 AM To: [EMAIL PROTECTED] Subject: Re: Full Text Search Question To do a full word match like you are wanting, you would need to break up the sql query to do this: ... WHERE field LIKE "%word1%" AND field LIKE "%word2%" ... That is how you have to do it if you are not using one of the latest 3.23 versions of mysql. If you have a newer version of mysql, check out this page for more info http://www.mysql.com/doc/M/y/MySQL_full-text_search.html On 4/3/01 11:07 AM, "Oson, Chris M." [EMAIL PROTECTED] wrote: Hello, I have a site that I'm trying to implement a search engine on existing and archived news stories on a medium text datatype in a database. I read the documentation and got it running, but unless I missed something it's not doing what I want it to do. For example, if I put in the keywords [Alpine Fire], it will return all stories with Alpine Fire in it. That is what I want, but if there's another story about a fire, the search will return that also. Or if there's a story about an incident on Alpine street, that will also be returned. What I want is only stories that contain the keywords [Alpine Fire]. Is there a way to do that with a full text search? I'd rather not have to do a search using [LIKE '%Alpine Fire%'] because that doesn't seem like the most efficient way to do a search. chris - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Full Text Search Question
Oson take a look at mysql documentantion. You can do this with match against. A IR system is somewhat different than a DB. But mysql is both an IR and a DB. Oson, Chris M. wrote: Hello, I have a site that I'm trying to implement a search engine on existing and archived news stories on a medium text datatype in a database. I read the documentation and got it running, but unless I missed something it's not doing what I want it to do. For example, if I put in the keywords [Alpine Fire], it will return all stories with Alpine Fire in it. That is what I want, but if there's another story about a fire, the search will return that also. Or if there's a story about an incident on Alpine street, that will also be returned. What I want is only stories that contain the keywords [Alpine Fire]. Is there a way to do that with a full text search? I'd rather not have to do a search using [LIKE '%Alpine Fire%'] because that doesn't seem like the most efficient way to do a search. chris - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- -- Antonio Gulli'Ideare S.p.a tel: (+39) 050 575300 [EMAIL PROTECTED] Lungarno Mediceo 56 fax: (+39) 050 575583 whois: AG2-ORG I-56126 Pisa, Italy http://www.ideare.com net: print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*", )]}\EsMsKsN0[lN*1lK[d2%Sa2/d0X+d*lMLa^*lN%0]dsXx++lMlN/dsM0J]dsJxp"|dc` - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php