Skip to main content

Documentation Index

Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt

Use this file to discover all available pages before exploring further.

The Lucidworks Typeahead Service API returns a list of suggestions created in Lucidworks Platform Core Settings. Using the unique TYPEAHEAD_ID for your Typeahead configuration, you can retrieve a list of suggestions based on the characters included in the request.
For detailed API specifications in Swagger/OpenAPI format, see Platform APIs.

Prerequisites

To use this API, you need:
  • Typeahead suggestions entered or written into Lucidworks Platform Core Settings. A total of 5,000 suggestions are allowed in the following distribution:
    • Your organization can enter a maximum of 4,000 custom terms (included and excluded) in the Core Settings Typeahead user interface.
    • Every hour, a maximum of 1,000 of the terms entered most often in customer searches are added to the Included typeahead suggestions list.
  • The unique TYPEAHEAD_ID for your typeahead implementation. Contact your Lucidworks Platform representative for this information.

Unique values for the typeahead use case

Some query parameters unique to the typeahead use case can be used in the URL of the GET request of the Core Settings Typeahead Service API, including prefix and limit. Refer to the API spec for more information.

Example GET request with prefix query parameter

Request
curl --request GET \
  --url  https://{TYPEAHEAD_ID}.typeahead.lucidworks.com/typeahead/suggestions?prefix=El \
  --header 'Accept: application/json' \
  --header 'Authorization: Embed EMBED_TOKEN' \
  --header 'Content-type: application/json' \
  --data ''

Response

The API call returns suggestions that begins with the letters El.
[
  "Elastic",
  "Electric",
  "Electrical",
  "Electronics",
  "Elegant",
  "Element",
  "Elevator",
  "Elite",
  "Elixir",
  "Ellipse"
]

Result sorting

Typeahead results are sorted alphabetically. Sort options are not currently available with the API.
If the request does not include a query parameter after the ? in the URL of the request, the complete list of suggestions is returned.