vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi All, I want a boolean search on a phrase. For example on "olive oil", but it should return also "olive oils" etc. Now I use the following: SELECT Description FROM products WHERE MATCH (Description ) AGAINST('"olive oil"' IN BOOLEAN MODE); This works fine, but it does NOT return rows with "olive oils". I tried the following: .... MATCH (Description ) AGAINST('"olive oil*"' IN BOOLEAN MODE); but that doesn't work. Any idea will be appreciated. TIA, Cor |
| |||
| Hi The Boolen Search will itself satisfy your query. If you enclose the phrase within double quote ('"'), then the characters matches only rows that contain the phrase literally, as it was typed. Try removing quotes. Thanks ViSolve DB Team. ----- Original Message ----- From: "C.R.Vegelin" <cr.vegelin@hetnet.nl> To: <mysql@lists.mysql.com> Sent: Thursday, October 12, 2006 2:42 PM Subject: boolean search on phrase* Hi All, I want a boolean search on a phrase. For example on "olive oil", but it should return also "olive oils" etc. Now I use the following: SELECT Description FROM products WHERE MATCH (Description ) AGAINST('"olive oil"' IN BOOLEAN MODE); This works fine, but it does NOT return rows with "olive oils". I tried the following: .... MATCH (Description ) AGAINST('"olive oil*"' IN BOOLEAN MODE); but that doesn't work. Any idea will be appreciated. TIA, Cor |
| |||
| Thanks ViSolve, So far I have tried the next alternatives, not giving me what I need: a) ... MATCH (Description) AGAINST('"olive oil"' IN BOOLEAN MODE) giving only "olive oil" but not "olive oils" b) ... MATCH (Description) AGAINST('olive oil' IN BOOLEAN MODE) giving "olive oil" and "olive oils" BUT also "fatty oils ... (excl. olive)" c) ... MATCH (Description) AGAINST("olive oil" IN BOOLEAN MODE) giving the same results as b) Any more ideas ? TIA, Cor ----- Original Message ----- From: Visolve DB Team To: C.R.Vegelin ; mysql@lists.mysql.com Sent: Thursday, October 12, 2006 9:54 AM Subject: Re: boolean search on phrase* Hi The Boolen Search will itself satisfy your query. If you enclose the phrase within double quote ('"'), then the characters matches only rows that contain the phrase literally, as it was typed. Try removing quotes. Thanks ViSolve DB Team. ----- Original Message ----- From: "C.R.Vegelin" <cr.vegelin@hetnet.nl> To: <mysql@lists.mysql.com> Sent: Thursday, October 12, 2006 2:42 PM Subject: boolean search on phrase* Hi All, I want a boolean search on a phrase. For example on "olive oil", but it should return also "olive oils" etc. Now I use the following: SELECT Description FROM products WHERE MATCH (Description ) AGAINST('"olive oil"' IN BOOLEAN MODE); This works fine, but it does NOT return rows with "olive oils". I tried the following: ... MATCH (Description ) AGAINST('"olive oil*"' IN BOOLEAN MODE); but that doesn't work. Any idea will be appreciated. TIA, Cor |
| |||
| Hi, Try with + and * fulltext boolean operators. For instance, MATCH (Description) AGAINST('+olive oil*' IN BOOLEAN MODE) Thanks, ViSolve DB Team. ----- Original Message ----- From: "C.R.Vegelin" <cr.vegelin@hetnet.nl> To: "Visolve DB Team" <mysql_support@visolve.com>; <mysql@lists.mysql.com> Sent: Thursday, October 12, 2006 4:08 PM Subject: Re: boolean search on phrase* Thanks ViSolve, So far I have tried the next alternatives, not giving me what I need: a) ... MATCH (Description) AGAINST('"olive oil"' IN BOOLEAN MODE) giving only "olive oil" but not "olive oils" b) ... MATCH (Description) AGAINST('olive oil' IN BOOLEAN MODE) giving "olive oil" and "olive oils" BUT also "fatty oils ... (excl. olive)" c) ... MATCH (Description) AGAINST("olive oil" IN BOOLEAN MODE) giving the same results as b) Any more ideas ? TIA, Cor ----- Original Message ----- From: Visolve DB Team To: C.R.Vegelin ; mysql@lists.mysql.com Sent: Thursday, October 12, 2006 9:54 AM Subject: Re: boolean search on phrase* Hi The Boolen Search will itself satisfy your query. If you enclose the phrase within double quote ('"'), then the characters matches only rows that contain the phrase literally, as it was typed. Try removing quotes. Thanks ViSolve DB Team. ----- Original Message ----- From: "C.R.Vegelin" <cr.vegelin@hetnet.nl> To: <mysql@lists.mysql.com> Sent: Thursday, October 12, 2006 2:42 PM Subject: boolean search on phrase* Hi All, I want a boolean search on a phrase. For example on "olive oil", but it should return also "olive oils" etc. Now I use the following: SELECT Description FROM products WHERE MATCH (Description ) AGAINST('"olive oil"' IN BOOLEAN MODE); This works fine, but it does NOT return rows with "olive oils". I tried the following: ... MATCH (Description ) AGAINST('"olive oil*"' IN BOOLEAN MODE); but that doesn't work. Any idea will be appreciated. TIA, Cor |
| |||
| Hi ViSolve, I have tried various combinations with + and *, and with single and/or double quotes. But unfortunately I can't get the proper results. I get the impression that it's not possible ... Thanks anyway, Cor ----- Original Message ----- From: "Visolve DB Team" <mysql_support@visolve.com> To: "C.R.Vegelin" <cr.vegelin@hetnet.nl>; <mysql@lists.mysql.com> Sent: Thursday, October 12, 2006 11:05 AM Subject: Re: boolean search on phrase* > Hi, > > Try with + and * fulltext boolean operators. > For instance, > MATCH (Description) AGAINST('+olive oil*' IN BOOLEAN MODE) > > Thanks, > ViSolve DB Team. > ----- Original Message ----- > From: "C.R.Vegelin" <cr.vegelin@hetnet.nl> > To: "Visolve DB Team" <mysql_support@visolve.com>; <mysql@lists.mysql.com> > Sent: Thursday, October 12, 2006 4:08 PM > Subject: Re: boolean search on phrase* > > > Thanks ViSolve, > > So far I have tried the next alternatives, not giving me what I need: > a) ... MATCH (Description) AGAINST('"olive oil"' IN BOOLEAN MODE) > giving only "olive oil" but not "olive oils" > b) ... MATCH (Description) AGAINST('olive oil' IN BOOLEAN MODE) > giving "olive oil" and "olive oils" BUT also "fatty oils ... (excl. > olive)" > c) ... MATCH (Description) AGAINST("olive oil" IN BOOLEAN MODE) > giving the same results as b) > > Any more ideas ? > TIA, Cor > ----- Original Message ----- > From: Visolve DB Team > To: C.R.Vegelin ; mysql@lists.mysql.com > Sent: Thursday, October 12, 2006 9:54 AM > Subject: Re: boolean search on phrase* > > > Hi > > The Boolen Search will itself satisfy your query. If you enclose the > phrase within double quote ('"'), then the characters matches only rows > that contain the phrase literally, as it was typed. > > Try removing quotes. > > Thanks > ViSolve DB Team. > > ----- Original Message ----- > From: "C.R.Vegelin" <cr.vegelin@hetnet.nl> > To: <mysql@lists.mysql.com> > Sent: Thursday, October 12, 2006 2:42 PM > Subject: boolean search on phrase* > > > Hi All, > > I want a boolean search on a phrase. > For example on "olive oil", but it should return also "olive oils" etc. > Now I use the following: > SELECT Description FROM products > WHERE MATCH (Description ) AGAINST('"olive oil"' IN BOOLEAN MODE); > This works fine, but it does NOT return rows with "olive oils". > I tried the following: > ... MATCH (Description ) AGAINST('"olive oil*"' IN BOOLEAN MODE); > but that doesn't work. > Any idea will be appreciated. > > TIA, Cor > > > |
| |||
| Based on my experience, that wouldn't quite work. You'd need to preface each word with a plus sign: +olive +oil* and it would return records regardless of the order in which the two words appear, nor how far apart they are. That might be desirable, or it might not. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -----Original Message----- > From: Visolve DB Team [mailto:mysql_support@visolve.com] > Sent: Thursday, October 12, 2006 4:55 AM > To: C.R.Vegelin; mysql@lists.mysql.com > Subject: Re: boolean search on phrase* > > Hi > > The Boolen Search will itself satisfy your query. If you > enclose the phrase within double quote ('"'), then the > characters matches only rows that contain the phrase > literally, as it was typed. > > Try removing quotes. > > Thanks > ViSolve DB Team. > > ----- Original Message ----- > From: "C.R.Vegelin" <cr.vegelin@hetnet.nl> > To: <mysql@lists.mysql.com> > Sent: Thursday, October 12, 2006 2:42 PM > Subject: boolean search on phrase* > > > Hi All, > > I want a boolean search on a phrase. > For example on "olive oil", but it should return also "olive > oils" etc. > Now I use the following: > SELECT Description FROM products > WHERE MATCH (Description ) AGAINST('"olive oil"' IN BOOLEAN MODE); > This works fine, but it does NOT return rows with "olive oils". > I tried the following: > ... MATCH (Description ) AGAINST('"olive oil*"' IN BOOLEAN MODE); > but that doesn't work. > Any idea will be appreciated. > > TIA, Cor > > |
| ||||
| Hi Brigitte, I have tried some REGEXP expressions to get right truncated phrases. Apparently the following query gives me the right truncated result: SELECT Description FROM products WHERE Description REGEXP 'olive oil'; This query does include products with "olive oil" and "olive oils", and excludes products with "fatty oils ... (excl. olive)". Unfortunately, it is slower than MATCH ... AGAINST ..., probably because it's not using the fulltext key on the Description field. Thanks, Cor ----- Original Message ----- From: "Brigitte Silins" <brigitte@agora.ca> To: "C.R.Vegelin" <cr.vegelin@hetnet.nl> Sent: Thursday, October 12, 2006 2:58 PM Subject: Re: boolean search on phrase > Hello: > > I may be going out on a limb, as I missed part of the thread; > nevertheless, have you tried regular expressions? > > As in REGEXP 'oils?' where the ? matches zero or one of the previous > characters. (or REGEXP 'oils{0,1} ) > > http://dev.mysql.com/doc/refman/4.1/en/regexp.html > > http://dev.mysql.com/doc/refman/5.1/en/regexp.html > > Regards, > > > Brigitte > > C.R.Vegelin wrote: >> Hi ViSolve, >> >> I have tried various combinations with + and *, >> and with single and/or double quotes. >> But unfortunately I can't get the proper results. >> I get the impression that it's not possible ... >> >> Thanks anyway, Cor >> >> ----- Original Message ----- From: "Visolve DB Team" >> <mysql_support@visolve.com> >> To: "C.R.Vegelin" <cr.vegelin@hetnet.nl>; <mysql@lists.mysql.com> >> Sent: Thursday, October 12, 2006 11:05 AM >> Subject: Re: boolean search on phrase* >> >> >>> Hi, >>> >>> Try with + and * fulltext boolean operators. >>> For instance, >>> MATCH (Description) AGAINST('+olive oil*' IN BOOLEAN MODE) >>> >>> Thanks, >>> ViSolve DB Team. >>> ----- Original Message ----- From: "C.R.Vegelin" <cr.vegelin@hetnet.nl> >>> To: "Visolve DB Team" <mysql_support@visolve.com>; >>> <mysql@lists.mysql.com> >>> Sent: Thursday, October 12, 2006 4:08 PM >>> Subject: Re: boolean search on phrase* >>> >>> >>> Thanks ViSolve, >>> >>> So far I have tried the next alternatives, not giving me what I need: >>> a) ... MATCH (Description) AGAINST('"olive oil"' IN BOOLEAN MODE) >>> giving only "olive oil" but not "olive oils" >>> b) ... MATCH (Description) AGAINST('olive oil' IN BOOLEAN MODE) >>> giving "olive oil" and "olive oils" BUT also "fatty oils ... (excl. >>> olive)" >>> c) ... MATCH (Description) AGAINST("olive oil" IN BOOLEAN MODE) >>> giving the same results as b) >>> >>> Any more ideas ? >>> TIA, Cor >>> ----- Original Message ----- From: Visolve DB Team >>> To: C.R.Vegelin ; mysql@lists.mysql.com >>> Sent: Thursday, October 12, 2006 9:54 AM >>> Subject: Re: boolean search on phrase* >>> >>> >>> Hi >>> >>> The Boolen Search will itself satisfy your query. If you enclose the >>> phrase within double quote ('"'), then the characters matches only rows >>> that contain the phrase literally, as it was typed. >>> >>> Try removing quotes. >>> >>> Thanks >>> ViSolve DB Team. >>> >>> ----- Original Message ----- From: "C.R.Vegelin" >>> <cr.vegelin@hetnet.nl> >>> To: <mysql@lists.mysql.com> >>> Sent: Thursday, October 12, 2006 2:42 PM >>> Subject: boolean search on phrase* >>> >>> >>> Hi All, >>> >>> I want a boolean search on a phrase. >>> For example on "olive oil", but it should return also "olive oils" etc. >>> Now I use the following: >>> SELECT Description FROM products >>> WHERE MATCH (Description ) AGAINST('"olive oil"' IN BOOLEAN MODE); >>> This works fine, but it does NOT return rows with "olive oils". >>> I tried the following: >>> ... MATCH (Description ) AGAINST('"olive oil*"' IN BOOLEAN MODE); >>> but that doesn't work. >>> Any idea will be appreciated. >>> >>> TIA, Cor >>> >>> >>> >> >> >> > |