Web service API

How to use PageSeeder's Web service API

autosuggest group fields

/groups/{group}/autosuggest/fields [GET]

com.pageseeder.search.AutoSuggest

Description

Return result suggestions from a query for a specific field

This service returns the list of result suggestions from a prefix match on a set of fields.

Auto-suggest vs auto-complete

The auto-complete function simply returns the list of possible search terms using prefix matching.

For example, for term "ali", the auto-complete will return terms like "align", "alignment", etc.

The auto-suggest feature returns possible search results by using the auto-complete function on a list of terms and the executing the corresponding query with these terms.

For example, for term "ali", the auto-suggest will first determine the list of possible match terms and then will return the best matching search results including these terms.

Parameters

NameDescriptionRequiredTypeDefault value
fieldsThe index fields to searchyesstring
termThe prefix of the  termsyesstring
predicateA additional predicate - this is an advanced optionnoLucene predicate+type:document

Permission

Undocumented permissions requirements.

Response

This service returns the following XML:

<auto-suggest term="term">
  <search-results index="[id]">
    <query lucene="[lucene query]">
      <suggestion-query>
        <terms>
          <!-- List of possible matching terms -->
          <term field="[index field name]"
                text="[matching term]"/>
          ...
        </terms>
        <condition>[lucene predicate]</condition>
      </suggestion-query>
      <documents>
        <!-- each suggested results as a Lucene document -->
        <document> ... </document>
      </documents>
    </query>
  </search-results>
</auto-suggest>

Error handling

No specific errors expected for this service.

Created on , last edited on