On 12/28/05, Gleb Paharenko <[EMAIL PROTECTED]> wrote:
> Hello.
>
> > #1054 - Unknown column 'CommentsIDX' in 'where clause'
> > My table structure contains:    FULLTEXT KEY `CommentsIDX` >(`Comments`)
>
> You should use column names not index names in your queries. Please,
> provide CREATE statement for your tables and problematic queries. With
> this information it'll be easier to help you.
>

Thanks this is the a snippet of the table structure:
CREATE TABLE `properties` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `UserID` int(11) unsigned NOT NULL default '0',
  `Type` enum('Commercial','Residential') NOT NULL default 'Residential',
  `Subtype` varchar(64) NOT NULL default '0',
  `Zip` varchar(10) NOT NULL default '',
  `Heading` varchar(84) NOT NULL default '',
  `Address1` varchar(32) NOT NULL default '',
  `Address2` varchar(32) default NULL,
.....
  KEY `TypeSubType` (`Type`,`Subtype`),
  KEY `CityHood` (`City`,`Neighborhood`),
  FULLTEXT KEY `CommentsIDX`
(`Comments`,`Subtype`,`Heading`,`Zip`,`Address1`,`Neighborhood`,`City`,`Country`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=101131 ;

I guess my question is, how do I make sure the full text search is
being done against the CommentsIDX and not just against the individual
fields...

SELECT * FROM properties WHERE MATCH
(Comments,Subtype,Heading,Zip,Address1,Neighborhood,City,Country)
AGAINST (
"search words" WITH QUERY EXPANSION)

Thanks,
Michael

>
>
> Michael Stearne wrote:
> > I am trying to do a fulltext search with a multi-field index using MySQL 4.=
> > 1.15.
> >
> > When I create a full text index of my Comments field which is of type
> > TEXT.  I can do a fulltext search fine.
> >
> > But when I add another field (like a varchar or even Text) to that
> > index or change the name of the index I get and error like:
> >
> > SELECT * FROM properties WHERE MATCH (CommentsIDX)
> > AGAINST (
> > "item1 OR item2 AND (item3 AND item4 NOT (item5 OR item6))"
> > WITH QUERY EXPANSION
> > )
> >
> > MySQL said: Documentation
> > #1054 - Unknown column 'CommentsIDX' in 'where clause'
> >
> > My table structure contains:    FULLTEXT KEY `CommentsIDX` (`Comments`)
> >
> > Any ideas?
> >
> > Thanks
> >
>
>
> --
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.NET http://www.ensita.net/
>    __  ___     ___ ____  __
>   /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
>        <___/   www.mysql.com
>
>
>
>
> --
> 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]

Reply via email to