group autosuggest
/groups/{group}/autosuggest [GET]
| API Support | Available since | Last updated | Output |
|---|---|---|---|
| 4.7006 | 5.9800 | xml, json |
Description
This service returns the list of result suggestions from a prefix match on a set of fields. If there are multiple words in term, only the last word is used for prefix matching with an AND on the other words.
Parameters
| Name | Description | Required | Type | Default |
|---|---|---|---|---|
| term | The prefix for the terms to use for the AutoSuggest | yes | string | |
| fields | A comma-separated list of fields to search in | no | strings | pstitle,psfilename,psdocid,psid |
| filters | A comma-separated list of field:term pairs to use as filters | no | strings | |
| results | The maximum number of results to return | no | integer | 10 |
Although the term parameter isn't strictly required, failing to specify a term always returns an empty result set.
Permission
This service is restricted to guest and higher.
Response
Example XML output:
<autosuggest term="lorem">
<query empty="false" predicate="...">
<suggestion-query>
<terms>
<term field="pstitle" text="lorem"/>
<term field="psfilename" text="lorem"/>
<term field="psdocid" text="lorem"/>
<term field="psid" text="lorem"/>
</terms>
<condition>pstype:document</condition>
</suggestion-query>
</query>
<results page="1"
page-size="10"
total-pages="1"
total-results="2"
first-result="1"
last-result="2">
<result score="1.6665791">
<field name="psid">4482</field>
<field name="pstitle">lorem_ipsum.psml</field>
...
</result>
<result score="1.6665700">
<field name="psid">4400</field>
<field name="pstitle">lorem.psml</field>
...
</result>
</results>
</autosuggest>
Error Handling
No specific errors expected for this service.