Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: SharePoint Server 2010
You can use the Query method and QueryEx method to execute a query and return search results.
Schema
<QueryPacket>
    <Query>
        <QueryId />
        <OriginatorId />
        <Context>
            <QueryText />
        </Context>
        <Range>
            <StartAt />
            <Count />
        </Range>
        <Properties>
            <Property />
        </Properties>
        <SortByProperties>
            <SortByProperty />
        </SortByProperties>
        <ImplicitAndBehavior />
        <RelevanceModel />
        <EnableStemming />
        <TrimDuplicates />
        <IncludeSpecialTermResults />
        <PreQuerySuggestions />
        <HighlightQuerySuggestions />
        <CapitalizeFirstLetters />
        <ResultProvider />
        <ResubmitFlags>
            <ResubmitFlag />
        </ResubmitFlags>
        <EnableSpellcheck />
        <UserContext>
            <UserContextData />
        </UserContext>
        <FindSimilar>
            <SimilarTo />
            <SimilarType />
            <SortSimilar />
        </FindSimilar>
        <IncludeRefinementResults>
            <Refiners>
               <Refiner />
            </Refiners>
            <MaxShallowRefinementHits />
        </IncludeRefinementResults>
        <RefinementFilters>
            <RefinementFilter />
        </RefinementFilters>
        <IgnoreAllNoiseQuery />
        <IncludeRelevantResults />
        <IncludeHighConfidenceResults />
    </Query>
</QueryPacket>
Elements
Name  | 
Description  | 
|---|---|
Contains all the elements for the search query request.  | 
|
Contains the elements that define the search query.  | 
|
A GUID that uniquely identifies a query request.  | 
|
Represents the elements of the search query.  | 
|
Represents the search query issued to the Web service.  | 
|
Specifies the range of the search results.  | 
|
Specifies the search result to return as the initial result.  | 
|
Specifies the maximum number of results to return.  | 
|
Contains the managed properties to include in the search results.  | 
|
Contains a managed property to include in the search results.  | 
|
Contains the managed properties by which to sort the search results.  | 
|
Specifies the managed property to sort the search results on.  | 
|
Specifies whether there is a default AND between keyword terms in the query.  | 
|
A GUID that uniquely identifies a ranking model to use for the search query. This element applies only to SharePoint Server search.  | 
|
Specifies whether stemming is enabled.  | 
|
Specifies whether duplicate results collapsing is enabled.  | 
|
Specifies whether special term results (for instance best bets) should be included in the response.  | 
|
Specifies whether pre-query suggestions should be included in the response.  | 
|
Specifies whether parts of the query suggestion should be highlighted. This element applies only to SharePoint Server search.  | 
|
Specifies whether the first letter in the query suggestion should be capitalized. This element applies only to SharePoint Server search.  | 
|
Represents the result provider for the search query.  | 
|
Specifies the criteria for automatically resubmitting a query that yielded no results. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains one value indicating an action to be taken if no hits are found. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Specifies how to apply spelling correction of the query text when processing the request to the Query Web service. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains user context data associated with search settings (best bets, visual best bets, and keyword boosting). This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains one user context specification associated with search settings (best bets, visual best bets, and keyword boosting). This element is applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains information about how to search for similar items. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains the similarity reference when searching for similar items. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains the type of find similar query to perform. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Specifies whether query results based on similarity are sorted by similarity. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains information about what type of query refinement data to be returned in the result. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains the set of refiners to be returned in a query result. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains one refiner to be returned in a query result. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains the number of results to be used to calculate shallow refinement results. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains the set of query refinement filters used when issuing a refinement query. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Contains one query refinement (drill down) filter used when issuing a refinement query. This element applies only to FAST Search Server 2010 for SharePoint.  | 
|
Specifies whether noise words in the query should be ignored. This element applies only to SharePoint Server search.  | 
|
Specifies whether relevant results should be returned.  | 
|
Specifies whether high confidence results should be returned. This element applies only to SharePoint Server search.  | 
See Also
Reference
Concepts
Walkthrough: Querying SharePoint Search From a Client Application