SearchUI - Using autocompleteQuery with elastic search connector

Im moving from using the app search connector to the elastic client connector. It seems that autocompleteQuery does not work in the Elasticsearch connector the same way it does in the app search connector.

Example

App search connector:

  1. Go to the app search connector demo page here
  2. type "yos" into the header

You will get the following results in the UI:
image

and the following requests will have been sent:

using this config

autocompleteQuery: {
    results: {
      resultsPerPage: 5,
      result_fields: {
        title: {
          snippet: {
            size: 100,
            fallback: true
          }
        },
        nps_link: {
          raw: {}
        }
      }
    },
    suggestions: {
      types: {
        documents: {
          fields: ["title", "description"]
        }
      },
      size: 4
    }
  },

However, if you do the same thing using

  1. the Elasticsearch connector demo page here
  2. type "yos" into the header

You will get the following results in the UI:
image

and the following requests will have been sent:

using this config:

autocompleteQuery: {
    results: {
      search_fields: {
        parks_search_as_you_type: {}
      },
      resultsPerPage: 5,
      result_fields: {
        title: {
          snippet: {
            size: 100,
            fallback: true
          }
        },
        nps_link: {
          raw: {}
        }
      }
    },
    suggestions: {
      types: {
        documents: {
          fields: ["parks_completion"]
        }
      },
      size: 4
    }
  }

So my question is, even though both of these example apps have the same config setup, why does only the app search connector return the auto complete queries in the UI?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.