Re: Keyword Search
It would probably be better to post this to the Lasso discussion list at Blueworld.com as for Lasso, this will require you to use tags but it's been ages since I coded with Lasso (3.6 and FileMaker. :) and I can't recall/never knew, the tag modifications. Good luck --- maggie chloe [EMAIL PROTECTED] wrote: I am new to Lasso and My SQL, but I have a pretty basic question on searching a text field using Keywords. I think I am missing something easy. I have a MySql database and am using Lasso 7. The user enters search information on a form on a search.lasso page and an inline search is then run on a results.lasso page. I want to parse out what the user enters and search the text field and retrieve only those records that contain each word of the search. For example: Where field is 'NAME' Record 1 contains 'John Michael Smith' Record 2 contain 'John Adams' Record 3 conains 'John Smith' Record 4 contains 'Michael Smith' If the user searches the field by typing 'John Smith' his found set should contain Record 1 and Record 3 only. How do I accomplish this? This is the inline that I'm using. [Inline:(Action_Params),-Search,-database='DATABASE',- Layout='CONTACTS',-Operator='ft','NAME'=(Action_Param:'NAME')] Thanks for your help, David -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] = Robert Reed 512-869-0063 home 512-818-2460 cell __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Keyword Search
I am new to Lasso and My SQL, but I have a pretty basic question on searching a text field using Keywords. I think I am missing something easy. I have a MySql database and am using Lasso 7. The user enters search information on a form on a search.lasso page and an inline search is then run on a results.lasso page. I want to parse out what the user enters and search the text field and retrieve only those records that contain each word of the search. For example: Where field is 'NAME' Record 1 contains 'John Michael Smith' Record 2 contain 'John Adams' Record 3 conains 'John Smith' Record 4 contains 'Michael Smith' If the user searches the field by typing 'John Smith' his found set should contain Record 1 and Record 3 only. How do I accomplish this? This is the inline that I'm using. [Inline:(Action_Params),-Search,-database='DATABASE',- Layout='CONTACTS',-Operator='ft','NAME'=(Action_Param:'NAME')] Thanks for your help, David -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Problems with boolean keyword search
Hello, I have to build a keyword search with support for the boolean operators +, -, * and . Basically it's quite easy: Connect the three tables with two joins, keyword search with LIKE. But the boolean operators give me a headache. mysql SELECT c.id FROM keywords AS a LEFT JOIN keywords_transfer AS b - ON a.id = b.keyword LEFT JOIN images AS c ON b.series = c.series - AND b.image = c.image WHERE a.word LIKE 'costa brava' AND a.word LIKE - 'Ziegenkäse' AND a.word NOT LIKE 'Dörfer'; Empty set (0.00 sec) That was my first idea. It should return one row. It's clear that it does not, because a.word contains only one keyword. Second idea was to fetch all the images which are (not) matching the query and calculate the intersection. SELECT id, image, series, title, variant_t FROM images WHERE 1 OR (image = '001' and series = '07001') OR (image = '002' and series = '07001') OR (image = '003' and series = '07001') OR (image = '004' and series = '07001') OR (image = '006' and series = '07001') OR (image = '007' and series = '07001') OR (image = '008' and series = '07001') OR (image = '009' and series = '07001') OR (image = '010' and series = '07001') OR (image = '011' and series = '07001') OR (image = '012' and series = '07001') OR (image = '013' and series = '07001') OR (image = '014' and series = '07001') OR (image = '015' and series = '07001') OR (image = '016' and series = '07001') OR (image = '017' and series = '07001') OR (image = '018' and series = '07001') OR (image = '019' and series = '07001') OR (image = '020' and series = '07001') OR (image = '021' and series = '07001') If the search is only matching a few fields, it works quiet well, but with a bigger result set it's very slow. Quering the table using WHERE image IN (...) and series IN (...) is not possible because it would fetch to much images if the keywords are matching two different values for series. Has anyone a hint for me to get that working at a good speed? Regards, A. P.S: I have to use the fields series and image insted of the primary keys to link the tables. If I don't do that, I have problems with the data integriy because of the import scripts. -- mysql SELECT * FROM keywords LIMIT 5; ++-++ | id | word| amount | ++-++ | 1 | Firence | 49 | | 2 | Italien | 49 | | 3 | Toscana | 49 | | 4 | Florenz | 59 | | 5 | ESF | 29 | ++-++ 5 rows in set (0.00 sec) mysql SELECT * FROM keywords_transfer LIMIT 5; +++---+-+ | id | series | image | keyword | +++---+-+ | 1 | 00026 | 001 | 1 | | 2 | 00026 | 001 | 2 | | 3 | 00026 | 001 | 3 | | 4 | 00026 | 001 | 4 | | 5 | 00026 | 001 | 5 | +++---+-+ 5 rows in set (0.00 sec) mysql SELECT id, series, image FROM images LIMIT 5; +++---+ | id | series | image | +++---+ | 1 | 00026 | 001 | | 2 | 00026 | 002 | | 3 | 00026 | 003 | | 4 | 00026 | 004 | | 5 | 00026 | 005 | +++---+ 5 rows in set (0.00 sec) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problems with boolean keyword search
FYI, MySQL allows boolean searching as of 4.0.1. See: http://dev.mysql.com/doc/mysql/en/Fulltext_Boolean.html Or pp. 256-257 of MySQL, 2nd Ed. by Paul DuBois for several examples. Eamon Daly - Original Message - From: Andreas Ahlenstorf [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 11:40 AM Subject: Problems with boolean keyword search Hello, I have to build a keyword search with support for the boolean operators +, -, * and . Basically it's quite easy: Connect the three tables with two joins, keyword search with LIKE. But the boolean operators give me a headache. mysql SELECT c.id FROM keywords AS a LEFT JOIN keywords_transfer AS b - ON a.id = b.keyword LEFT JOIN images AS c ON b.series = c.series - AND b.image = c.image WHERE a.word LIKE 'costa brava' AND a.word LIKE - 'Ziegenkäse' AND a.word NOT LIKE 'Dörfer'; Empty set (0.00 sec) That was my first idea. It should return one row. It's clear that it does not, because a.word contains only one keyword. Second idea was to fetch all the images which are (not) matching the query and calculate the intersection. SELECT id, image, series, title, variant_t FROM images WHERE 1 OR (image = '001' and series = '07001') OR (image = '002' and series = '07001') OR (image = '003' and series = '07001') OR (image = '004' and series = '07001') OR (image = '006' and series = '07001') OR (image = '007' and series = '07001') OR (image = '008' and series = '07001') OR (image = '009' and series = '07001') OR (image = '010' and series = '07001') OR (image = '011' and series = '07001') OR (image = '012' and series = '07001') OR (image = '013' and series = '07001') OR (image = '014' and series = '07001') OR (image = '015' and series = '07001') OR (image = '016' and series = '07001') OR (image = '017' and series = '07001') OR (image = '018' and series = '07001') OR (image = '019' and series = '07001') OR (image = '020' and series = '07001') OR (image = '021' and series = '07001') If the search is only matching a few fields, it works quiet well, but with a bigger result set it's very slow. Quering the table using WHERE image IN (...) and series IN (...) is not possible because it would fetch to much images if the keywords are matching two different values for series. Has anyone a hint for me to get that working at a good speed? Regards, A. P.S: I have to use the fields series and image insted of the primary keys to link the tables. If I don't do that, I have problems with the data integriy because of the import scripts. -- mysql SELECT * FROM keywords LIMIT 5; ++-++ | id | word| amount | ++-++ | 1 | Firence | 49 | | 2 | Italien | 49 | | 3 | Toscana | 49 | | 4 | Florenz | 59 | | 5 | ESF | 29 | ++-++ 5 rows in set (0.00 sec) mysql SELECT * FROM keywords_transfer LIMIT 5; +++---+-+ | id | series | image | keyword | +++---+-+ | 1 | 00026 | 001 | 1 | | 2 | 00026 | 001 | 2 | | 3 | 00026 | 001 | 3 | | 4 | 00026 | 001 | 4 | | 5 | 00026 | 001 | 5 | +++---+-+ 5 rows in set (0.00 sec) mysql SELECT id, series, image FROM images LIMIT 5; +++---+ | id | series | image | +++---+ | 1 | 00026 | 001 | | 2 | 00026 | 002 | | 3 | 00026 | 003 | | 4 | 00026 | 004 | | 5 | 00026 | 005 | +++---+ 5 rows in set (0.00 sec) -- 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: Problems with boolean keyword search
Hello, Eamon Daly schrieb am Donnerstag, 17. Juni 2004 um 19:04: FYI, MySQL allows boolean searching as of 4.0.1. See: http://dev.mysql.com/doc/mysql/en/Fulltext_Boolean.html I normally use that. But: Very bad result quality because there are only sigle keywords. I tried it with a text column containing all the keywords. Unfortunately not better. Regards, A. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Dumb Newbie Keyword Search Question
Thanks Alec, That is exactly what I was looking for. Dan I think what you want is a FULLTEXT index with the MATCH operator - see http://www.mysql.com/doc/F/u/Fulltext_Search.html . Particularl.y, see the new developments in fulltext in V4.0.1 half way doen the page Alec Cawley - 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: Dumb Newbie Keyword Search Question
Hi, I saw your discussion and i was wondering if any of you know if there is a way to stop mySQL from ignoring 3-letter words in the AGAINST statement when you use the MATCH operator? Thanks, -Tal-ee -Original Message- From: Dan Tappin [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 10:03 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Dumb Newbie Keyword Search Question Thanks Alec, That is exactly what I was looking for. Dan I think what you want is a FULLTEXT index with the MATCH operator - see http://www.mysql.com/doc/F/u/Fulltext_Search.html . Particularl.y, see the new developments in fulltext in V4.0.1 half way doen the page Alec Cawley - 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: Dumb Newbie Keyword Search Question
At 15:49 -0500 3/25/02, Tal-ee wrote: Hi, I saw your discussion and i was wondering if any of you know if there is a way to stop mySQL from ignoring 3-letter words in the AGAINST statement when you use the MATCH operator? Thanks, -Tal-ee It's in the manual. http://www.mysql.com/doc/F/u/Fulltext_Fine-tuning.html -Original Message- From: Dan Tappin [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 10:03 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Dumb Newbie Keyword Search Question Thanks Alec, That is exactly what I was looking for. Dan I think what you want is a FULLTEXT index with the MATCH operator - see http://www.mysql.com/doc/F/u/Fulltext_Search.html . Particularl.y, see the new developments in fulltext in V4.0.1 half way doen the page Alec Cawley - 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
Dumb Newbie Keyword Search Question
I have been looking through the mailing list archives but I can seem to find a straight forward answer anywhere. I have a MySQL table with a variety of text columns I would like to search. Pretty basic... A web search form returning the users input $keywords. Some type of relevance system would be great but it is not necessary. I have been messing around with LIKE, IN and to an extent REGEXP but I can't seem to get it to work. For example if the user inputs red fire engines I would like to query across colour, type and description for each of the words. Can this easily be done? Do I need to create a keywords column each time I update any of the keyword columns I would like to search? Any help would be greatly appreciated. I am also on digest mode so please CC me if you reply to the list or via versa. Thanks, Dan - 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
Keyword search string
Greetings, I have a table that has a column where search keywords are entered. column searchwords word1 word2 word3 ..etc Now when this column is queried for a search, I'm wonder how is the best way to evaluate matching the keywords. In the SELECT query, would I get better results if I use: WHERE searchwords IN (keyword_string) or WHERE serachwords LIKE "%keyword_string%" The "keyword_string" are the keywords entered into a search form, the same as the keywords where entered into the searchwords column: keyword1 keyword2..etc TIA, Mike(mickalo)Blezien Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Tel: 1(225) 686-2002 = - 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