基本上有两个问题。
1. 是否有一个 c++ 库可以像在 mysql 中一样进行全文布尔搜索。例如,
假设我有:
string text = "this is my phrase keywords test with boolean query.";
string booleanQuery = "\"my phrase\" boolean -test -\"keywords test\" OR ";
booleanQuery += "\"boolean search\" -mysql -sql -java -php"b
//where quotes ("") contain phrases, (-) is NOT keyword and OR is logical OR.
如果第一个答案是否定的,那么;
2. 是否可以在文本中搜索短语。例如,
string text =//same as previous
string keyword = "\"my phrase\"";
//here what's the best way to search for my phrase in the text?