私は現在、検索プロセスの一部としてIronyを使用しています(私の選択ではなく、:Pとは言えません)。文字「または」の後にスペースと別の単語「IE」を組み合わせて使用すると問題が発生します。ただし、「Orbit Gum」を検索すると、「orbit」や単に「or」などを検索すると、問題なく機能するようです。
発生するエラーは
Syntax error near 'gum' in the full-text search condition 'orbit gum'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Syntax error near 'gum' in the full-text search condition 'orbit gum'.
この部分を生成するために使用されているコードは
//Union with the full text search
if (!string.IsNullOrEmpty(fTextSearch))
{
sql.AppendLine("UNION");
sql.AppendLine(commonClause);
sql.AppendLine(string.Format("AND CONTAINS(nt.text, '{0}', LANGUAGE 'English')", fTextSearch));
}
私が見る限り、問題を引き起こしている実際のクエリは次の行です。
AND CONTAINS(nt.text, 'orbit gum', LANGUAGE 'English')