Namespace: search

search

Methods

(static) postSearch(cfg, webUrlopt) → {Promise.<object>}

Make a search request with a POST method. Useful if complex data needs to be sent to the server.
Use POST requests in the following scenarios:
- When you'll exceed the URL length restriction with a GET request.
- When you can't specify the query parameters in a simple URL.
  For example, if you have to pass parameter values that contain
  a complex type array, or comma-separated strings, you have more
  flexibility when constructing the POST request.
- When you use the ReorderingRules parameter because it is supported only with POST requests.
Parameters:
Name Type Attributes Description
cfg object the search configuration.
webUrl string <optional>
the url of the web to use as the context.
Source:
See:
  • sputils.search.searchCfgExample or SharePoint Search Query Tool
Returns:
the search result
Type
Promise.<object>
Example
sputils.search.postSearch({Querytext: 'ContentType:0x01*'})
  .then(function (result) { console.log(result) });

(static) searchCfgExample() → {object}

An example search configuration
Source:
See:
Returns:
a new object instance of a SearchConfigurationExample
Type
object