我有一個自定義FullTextSqlQuery
用於檢索某些特定的頁面。 查詢包含倍數FREETEXT
謂詞並給出了不可排名,預計根據MSDN行爲,查詢應該只包含一個FREETEXT
SharePoint FullTextSqlQuery搜索多列FREETEXT
,讓預期的結果基本查詢 SELECT Title, ACLanguage, ACContent, ACCategory, ACKeywords, ACID FROM scope() WHERE (FREETEXT(Title,'text') OR FREETEXT(ACContent, 'text') OR FREETEXT(ACSubtitle, 'text'))
的documentation此查詢說可以重寫爲使用組別別名的單個謂詞,但不清楚語法。我試過多個語句結尾: SELECT Title, ACLanguage, ACContent, ACCategory, ACKeywords, ACID FROM scope() WHERE WITH(Title, ACSubtitle, ACContent) AS #SearchColumns FREETEXT(#SearchColumns,'text')
但我所有的attemps與QueryMalformedException
如何把這個查詢被寫入結束?
您是否嘗試過將圍繞每個列名引號在WITH語句中?查看示例[here](http://books.google.com/books?id=PoYgYnodWKkC&pg=PA452&lpg=PA452&dq=sharepoint+sql+%22Group+Alias+Predicate%22&source=bl&ots=RGOwFi81TG&sig=oqsjt0dvlJDNetMgLUAatOn_u_U&hl=zh-CN&sa=X&ei=YQd -U_K1K8TNsQS0qILQBg&VED = 0CF0Q6AEwBg#v = onepage&q =的SharePoint%20sql%20%22Group%20Alias%20Predicate%22&F = FALSE)。 – Keith
是的,我嘗試過使用單/雙引號,還有像[這裏]的可選重量(http://books.google.lu/books?id=jU_eS5V5mvwC&pg=PA141&lpg=PA141&dq=%22scope+where+with%22&source= bl&ots = k2eluORplK&sig = UImV0ryFd9sqLW9lfL-xZvxyFo0&hl = fr&sa = X&ei = 4xR-U_z3IabS4QSB5YGwAQ&ved = 0CGAQ6AEwBg#v = onepage&q =%22scope%20 where%20with%22&f = false),總是以QueryMalformedException結尾。只需在'FREETEXT'中聲明帶有'WITH .. AS'子句的組而不會使用它。 –
奇怪。 FREETEXT在SharePoint中的文檔嚴重缺乏... – Keith