不确定这是否可能
我有一堆 100 个关键字,我正在运行 MATCH AGAINST 查询以查看这些关键字是否存在于表中 - 查询工作正常:
SELECT * FROM questions_new WHERE MATCH (question_title,question)
AGAINST ('depreciation amortization npv dcf "discounted cash flow" "cash flow statement" "current assets"' IN BOOLEAN MODE);
这只是一个包含几个关键字的示例查询
结果返回如下:
question_id | question_title | question
1 | what is depreciation | I am trying to do this DCF calculation......
2 | Need help with this | what is a cash flow statement
3 | Cannot solve this problem | Can you give more examples on npv
这是一个样本结果集。显然我的结果集要大得多。
现在查看 question_title 或问题 - 我很难找出匹配的关键字,因为关键字列表很大。
我想知道我是否可以在结果集中包含匹配的关键字,如下所示
question_id | keyword | question_title | question
1 | depreciation, DCF | what is depreciation | I am trying to do this DCF calculation......
2 | cash flow statement | Need help with this | what is a cash flow statement
3 | npv | Cannot solve this problem | Can you give more examples on npv
如您所见,第一个结果显示了 2 个匹配的关键字 - 折旧和 DCF。
有没有办法做到这一点。
提前感谢您的帮助