Query suggestions index - load records

The doco for uploading data to query suggestion index
https://www.algolia.com/doc/guides/getting-insights-and-analytics/leveraging-analytics-data/query-suggestions/
says to use json like this

  {
    "query": "iphone",
    "count": 10031
  }

Then sometime later Algolia will process it.

Can this json also be used?
I have found that the data is immediately available for searching

{
  "nb_words": 3,
  "popularity": 14,
  "query": "query search term",
  "my_index": {
    "exact_nb_hits": 14,
    "facets": {
      "exact_matches": {},
      "analytics": {}
    }
  },
  "objectID": "query search term"
}

I will confirm when the import has finished processing, but that last time I used the document json format, afterwards my data was gone

before:

Hi @andrew_algoliahpc,

Yes, I can confirm that the format of the JSON object you provided can be pushed to Algolia as an external data source for your Query suggestion index. There is no reason for your data to be “gone”, because of this format, so maybe your query suggestion index was deleted for another reason?

A few comments however on this data structure:

  • since there is no count attribute, the count for this query will default to 0. The count is used in the custom ranking of the popularity, so you should maybe rename your popularity attribute to count before pushing the data.
  • any attribute beside query in the object you provided will be disregarded. On top of query and count, only two other attributes can be read in the JSON payload: topTags and topRefinements.

I hope this helps!

This is what I get now - no results for gazebo

The index had 737 records, it now has 29

The records that are left look like this (that is why I tried this json)

To clarify, data loaded with this json has disappeared

  {
    "query": "iphone",
    "count": 10031
  }

Actually, I have just check my other index that was loaded with other json format, it it now has zero records

{
  "nb_words": 3,
  "popularity": 14,
  "query": "query search term",
  "my_index": {
    "exact_nb_hits": 14,
    "facets": {
      "exact_matches": {},
      "analytics": {}
    }
  },
  "objectID": "query search term"
}