Also known as
  • Add other possible names for this topic
Name   search
Description   Provides text search based on a query string and  optional constraints.
Accessible Via   /api/service/search
HTTP GET   Yes
HTTP POST   Yes
Special Headers   None
Login Required   No
Required Arguments   query: the string to do a search for
Optional Arguments   format: json, id, or guid

prefixed: a boolean (true, false, 1, 0)  that indicates whether the query is prefixed. It overrides the  presence of a terminating * in the query string.

 

limit: (default 20) the number of results to return

 

start: makes it possible to page through limit results at a time. For example, to present 5 pages of successive 10 results, the same query may be used with limit=10 and start=0, then 10, 20, 30 and 40.

 

type:  type value may be ids or guids of types in the graph. More than one type can be passed in by using the type parameter more than once or by separating type values by commas.

 

type_strict: makes it possible to control how specific the type matches must be. A value of should gives preference to matches by boosting their query score but doesn't require any, a value of any requests that at least one type value matches and all requires that all types match. By default, type_strict's value is any.

 

domain, domain_strict: searches may be made more specific by matching against the domain(s) of the type(s) of topics by passing one more of domain values. As with type_strict, the domain_strict parameter controls how specific the domain matches must be. More than one domain can be passed in by using the domain parameter more than once or by separating values by commas.

 

surrounds, surrounds_strict: searches may be made more specific by matching against the names of topics that directly connected to the topics sought by using one or more surrounds parameters. As with type and domain parameter, the surrounds_strict parameter controls how specific the surrounds matches must be. More than one surrounds query can be passed in by using the surrounds parameter more than once or by separating values by semicolons.


escape: how to escape results (html or false), default is html

 

timeout: may be used to specify an upper bound of milliseconds of time for the Lucene query to run. If the timeout is reached, the query is aborted and the matches found so far are returned. The timeout does not include the time necessary to run the eventual mql_output query to present results. If the timeout is reached, the API's status code is /api/status/timedout.

 

mql_filter: may be used to specify a topic-rooted MQL query to use against full text index matches.

 

mql_output: by default, query results are formatted with a MQL query that is applied against the topic identifiers, or guids, the matching documents were indexed with. The default MQL query used is:

[{
"guid": null,
"id": null,
"name": null,
"type": [],
"/common/topic/image": [{
"guid": null,
"id": null,
"type": "/common/image",
"optional": true,
"limit": 1,
"index": null,
"sort": "index"
}]
}]

This can be overridden with the mql_output parameter.
Extra Arguments Ignored   True
Response Format   application/json
Notes   For additional information on using the callback parameter to generate a JSONP response, or using onsucceed and onfail to redirect to a URI template, see Common API Query Parameters.
Status
Accessible via
  • /api/service/search
Login required
  • No
Permits HTTP GET
  • Yes
Permits HTTP POST
  • Yes
Special headers
Extra arguments ignored
  • Yes
Response type
With the exception of Wikipedia summaries and some images the content on this page is typically distributed under the Creative Commons Attribution license or Public Domain.