Louis W
Louis W

Reputation: 3252

Fulltext search with <> characters

Having problems getting the following query to work. I want to match the actual string " to control word relevance.

SELECT * FROM (table)
WHERE MATCH (field) AGAINST ("+<foo><![CDATA[1850]" IN BOOLEAN MODE)

When I run this it returns almost all records in the database, not just those which match the exact string.

Upvotes: 2

Views: 85

Answers (1)

vbence
vbence

Reputation: 20333

AFAIK you can not use special characters in full text search indexes. It is limited to TEXT. (Words to be exact. For example you can have a list of most common words to be excepted form this index). You have to use LIKE if you are searching for pieces of code with special characters.

Upvotes: 1

Related Questions