質問

私が作成したxml問合せた送信私ド検索サービスのた返す。その後、引きるSQLクエリーテキストでの使用を開始したこのオブジェクトモデルがで使用すれば問題ありません。なにかしらの利点があるのでしょうかやっても間違いに基づく以下のコード?

クエリーのXMLを返します結果):

<QueryPacket xmlns="urn:Microsoft.Search.Query" Revision="1000">
                                    <Query domain="QDomain">
                                     <SupportedFormats><Format>urn:Microsoft.Search.Response.Document.Document</Format></SupportedFormats>
                                     <Context>
                                       <QueryText language="en-US" type="MSSQLFT"><![CDATA[ SELECT Title, Rank, owsPublished1,owsSocialx0020Networkx0020Update, Description, Write, Path FROM scope()   ORDER BY "Rank" DESC ]]></QueryText>
                                     </Context>
                                     <Range><StartAt>1</StartAt><Count>20</Count></Range>
                                     <EnableStemming>false</EnableStemming>
                                     <TrimDuplicates>true</TrimDuplicates>
                                     <IgnoreAllNoiseQuery>true</IgnoreAllNoiseQuery>
                                     <ImplicitAndBehavior>true</ImplicitAndBehavior>        <IncludeRelevanceResults>true</IncludeRelevanceResults>                               <IncludeSpecialTermResults>true</IncludeSpecialTermResults>                        
<IncludeHighConfidenceResults>true</IncludeHighConfidenceResults>
                                    </Query></QueryPacket>

オブジェクトモデルコード(はな):

        SPSite site = new SPSite("http://sp-dev/");
        ServerContext sc = ServerContext.GetContext(site);
        FullTextSqlQuery ftq = new FullTextSqlQuery(sc);
        string querySQL = @"SELECT Title, Rank, owsPublished1,owsSocialx0020Networkx0020Update, Description, Write, Path FROM scope()   ORDER BY ""Rank"" DESC ";

        ftq.QueryText = querySQL;;
        ResultTableCollection results = ftq.Execute();
役に立ちましたか?

解決

少なくとも追加:

ftq.EnableStemming = false;
ftq.TrimDuplicates = true;
ftq.IgnoreAllNoiseQuery = true;
ftq.KeywordInclusion = KeywordInclusion.AllKeywords;

少なくともデフレとの比較をどのように行えばよいのですか。そして、もできます:

ftq.AuthenticationType = QueryAuthenticationType.PluggableAuthenticatedQuery;
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top