Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 根据查询查找与MySQL匹配的单词_C#_Mysql_Match Against - Fatal编程技术网

C# 根据查询查找与MySQL匹配的单词

C# 根据查询查找与MySQL匹配的单词,c#,mysql,match-against,C#,Mysql,Match Against,在我的C#应用程序中,我正在MySQL数据库中搜索与用户定义的关键字匹配的项目。 示例查询如下所示: SELECT * from records WHERE MATCH(body) AGAINST ('"some words" "more words" "singleword"') 我想为每个结果确定匹配的单词。 我希望避免编写更多代码来搜索DB返回的每个结果,以确定匹配项。 我正在考虑更改查询以在布尔模式下使用-在这种情况下,执行搜索可能会变得更加困难 有什么方法可以从MySQL中获得匹配的

在我的C#应用程序中,我正在MySQL数据库中搜索与用户定义的关键字匹配的项目。 示例查询如下所示:

SELECT * from records WHERE MATCH(body) AGAINST ('"some words" "more words" "singleword"')
我想为每个结果确定匹配的单词。 我希望避免编写更多代码来搜索DB返回的每个结果,以确定匹配项。 我正在考虑更改查询以在布尔模式下使用-在这种情况下,执行搜索可能会变得更加困难


有什么方法可以从MySQL中获得匹配的单词吗?

为什么不使用LIKE语句?Molderf-我不使用LIKE,因为我只想匹配整个单词,我想在布尔模式下使用该选项。Soner-我不知道我是否明白IN将如何帮助我,你能详细说明一下吗?