skyline26
skyline26

Reputation: 2034

Fulltext search against column value?

I've read this:

MySQL Fulltext search against column value?

but it is absurd, i don't understand why it is not possible doing this.

anyone knowing some workaround?

thanks

Upvotes: 0

Views: 708

Answers (2)

Diego
Diego

Reputation: 36156

Because the data is stored on the catalog. When you query a full text index, you are reading data from the catalog it is created, not the table the index is pointing to.

When you "populate" the catalog, you are telling your server to read data from the table and insert on the catalog. If you have a non static value, how will you read it?

Upvotes: 0

Ankit Sharma
Ankit Sharma

Reputation: 4069

This is my old procedure, try something like this in your case too-

BEGIN
  declare done default 0;
  declare csv1 varchar(100);
  declare cur1 cursor for select csv from table; 
  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=1;
  open cur1;
  repeat
  fetch cur1 into csv1;
  -
  -
  -
  -
  update company set (something) where match(csv) against(concat("'",csv1,"'"));
  until  done end repeat;
  -
  -
  close cur1;
  select * from table;
END

Upvotes: 1

Related Questions