Limited Response from API

Hello!

I’m integrated, but why doesn’t my full response with all fields come back from the auto complete api??

It is only a subset of the data and there should be far more fields:

image

Any help on this would be appreciated guys…

Hey there, the Algolia API only remove attributes from the response if you inform it to do so, otherwise it will send you back all the attributes. Are you using maybe the parameter https://www.algolia.com/doc/api-reference/api-parameters/attributesToRetrieve/ to reduce the number of attributes?

If you keep having an issue, please publish a live example and provide reproducible steps via a template here: https://github.com/algolia/create-instantsearch-app#previews.

The screenshot you have sent refers to editing an object on the Algolia dashboard.

I see all of the response data but in side of algolia the index and ‘preview’ look different and there is only a sub-set of the data showing. It also matches what is being called via the Algolia API but we need it to respond with all available fields.

We are not using attributes to retrieve to my understanding.

{

“hits”: [
{
“Airport ID”: 150,
“AirportCity”: “Toronto”,
“AirportNameShort”: “Toronto Buttonville”,
“AirportOfEntry”: “Yes”,
“AirportType”: “Civil”,
“All Fields”: “TORONTO BUTTONVILLE Toronto Ontario (CANADA) CYKZ / YKZ / CYKZ”,
“ApproachList”: “LOC GPS NDB”,
“objectID”: “24285782”,
“_highlightResult”: {
“Airport ID”: {
“value”: “150”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Toronto”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Toronto Buttonville”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “Yes”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Civil”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: “TORONTO BUTTONVILLE Toronto Ontario (CANADA) CYKZ / YKZ / CYKZ”,
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “LOC GPS NDB”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 0,
“firstMatchedWord”: 42,
“proximityDistance”: 0,
“userScore”: 4129,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
},
{
“Airport ID”: 316,
“AirportCity”: “Whitecourt”,
“AirportNameShort”: “Whitecourt”,
“AirportOfEntry”: “No”,
“AirportType”: “Civil”,
“All Fields”: “WHITECOURT Whitecourt Alberta (CANADA) CYZU / YZU / CYZU”,
“ApproachList”: “VOR/DME NDB”,
“objectID”: “24287252”,
“_highlightResult”: {
“Airport ID”: {
“value”: “316”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Whitecourt”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Whitecourt”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “No”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Civil”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: “WHITECOURT Whitecourt Alberta (CANADA) CYZU / YZU / CYZU”,
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “VOR/DME NDB”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 1,
“firstMatchedWord”: 40,
“proximityDistance”: 0,
“userScore”: 4276,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
},
{
“Airport ID”: 308,
“AirportCity”: “Toronto”,
“AirportNameShort”: “Downsview”,
“AirportOfEntry”: “No”,
“AirportType”: “Civil”,
“All Fields”: “DOWNSVIEW Toronto Ontario (CANADA) CYZD / / CYZD”,
“ApproachList”: “VFR”,
“objectID”: “24287182”,
“_highlightResult”: {
“Airport ID”: {
“value”: “308”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Toronto”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Downsview”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “No”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Civil”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: “DOWNSVIEW Toronto Ontario (CANADA) CYZD / / CYZD”,
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “VFR”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 1,
“firstMatchedWord”: 40,
“proximityDistance”: 0,
“userScore”: 4269,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
},
{
“Airport ID”: 149,
“AirportCity”: “Kindersley”,
“AirportNameShort”: “Kindersley”,
“AirportOfEntry”: “No”,
“AirportType”: “Civil”,
“All Fields”: “KINDERSLEY Kindersley Saskatchewan (CANADA) CYKY / YKY / CYKY”,
“ApproachList”: “NDB”,
“objectID”: “24285772”,
“_highlightResult”: {
“Airport ID”: {
“value”: “149”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Kindersley”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Kindersley”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “No”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Civil”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: “KINDERSLEY Kindersley Saskatchewan (CANADA) CYKY / YKY / CYKY”,
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “NDB”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 1,
“firstMatchedWord”: 40,
“proximityDistance”: 0,
“userScore”: 4128,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
},
{
“Airport ID”: 146,
“AirportCity”: “Schefferville”,
“AirportNameShort”: “Schefferville”,
“AirportOfEntry”: “No”,
“AirportType”: “Civil”,
“All Fields”: “SCHEFFERVILLE Schefferville Quebec (CANADA) CYKL / YKL / CYKL”,
“ApproachList”: “GPS VOR NDB”,
“objectID”: “24285752”,
“_highlightResult”: {
“Airport ID”: {
“value”: “146”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Schefferville”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Schefferville”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “No”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Civil”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: “SCHEFFERVILLE Schefferville Quebec (CANADA) CYKL / YKL / CYKL”,
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “GPS VOR NDB”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 1,
“firstMatchedWord”: 40,
“proximityDistance”: 0,
“userScore”: 4126,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
},
{
“Airport ID”: 6954,
“AirportCity”: “Kincardine”,
“AirportNameShort”: “Kincardine”,
“AirportOfEntry”: “No”,
“AirportType”: “Civil”,
“All Fields”: “KINCARDINE Kincardine Ontario (CANADA) CYKM / YKD / CYKM”,
“ApproachList”: “GPS NDB”,
“objectID”: “24279962”,
“_highlightResult”: {
“Airport ID”: {
“value”: “6954”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Kincardine”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Kincardine”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “No”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Civil”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: “KINCARDINE Kincardine Ontario (CANADA) CYKM / YKD / CYKM”,
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “GPS NDB”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 1,
“firstMatchedWord”: 40,
“proximityDistance”: 0,
“userScore”: 3547,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
},
{
“Airport ID”: 3865,
“AirportCity”: “Cauayan”,
“AirportNameShort”: “Cauayan”,
“AirportOfEntry”: “No”,
“AirportType”: “Civil”,
“All Fields”: "CAUAYAN Cauayan (PHILIPPINES) RPUY / CYZ / ",
“ApproachList”: “VOR/DME”,
“objectID”: “24260712”,
“_highlightResult”: {
“Airport ID”: {
“value”: “3865”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Cauayan”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Cauayan”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “No”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Civil”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: "CAUAYAN Cauayan (PHILIPPINES) RPUY / CYZ / ",
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “VOR/DME”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 1,
“firstMatchedWord”: 40,
“proximityDistance”: 0,
“userScore”: 1622,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
},
{
“Airport ID”: 7445,
“AirportCity”: “Perkasie”,
“AirportNameShort”: “Pennridge”,
“AirportOfEntry”: “No”,
“AirportType”: “Civil”,
“All Fields”: “PENNRIDGE Perkasie Pennsylvania (USA) KCKZ / / CKZ”,
“ApproachList”: “GPS”,
“objectID”: “24314622”,
“_highlightResult”: {
“Airport ID”: {
“value”: “7445”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Perkasie”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Pennridge”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “No”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Civil”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: “PENNRIDGE Perkasie Pennsylvania (USA) KCKZ / / CKZ”,
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “GPS”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 1,
“firstMatchedWord”: 41,
“proximityDistance”: 0,
“userScore”: 7013,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
},
{
“Airport ID”: 320,
“AirportCity”: “Mackenzie”,
“AirportNameShort”: “Mackenzie”,
“AirportOfEntry”: “No”,
“AirportType”: “Civil”,
“All Fields”: “MACKENZIE Mackenzie British Columbia (CANADA) CYZY / / CYZY”,
“ApproachList”: “VFR”,
“objectID”: “24287282”,
“_highlightResult”: {
“Airport ID”: {
“value”: “320”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Mackenzie”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Mackenzie”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “No”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Civil”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: “MACKENZIE Mackenzie British Columbia (CANADA) CYZY / / CYZY”,
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “VFR”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 1,
“firstMatchedWord”: 41,
“proximityDistance”: 0,
“userScore”: 4279,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
},
{
“Airport ID”: 319,
“AirportCity”: “Greenwood”,
“AirportNameShort”: “Greenwood”,
“AirportOfEntry”: “Yes”,
“AirportType”: “Military”,
“All Fields”: “GREENWOOD Greenwood Nova Scotia (CANADA) CYZX / YZX / CYZX”,
“ApproachList”: “ILS GPS NDB”,
“objectID”: “24287272”,
“_highlightResult”: {
“Airport ID”: {
“value”: “319”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportCity”: {
“value”: “Greenwood”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportNameShort”: {
“value”: “Greenwood”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportOfEntry”: {
“value”: “Yes”,
“matchLevel”: “none”,
“matchedWords”:
},
“AirportType”: {
“value”: “Military”,
“matchLevel”: “none”,
“matchedWords”:
},
“All Fields”: {
“value”: “GREENWOOD Greenwood Nova Scotia (CANADA) CYZX / YZX / CYZX”,
“matchLevel”: “full”,
“fullyHighlighted”: false,
“matchedWords”: [
“cykz”
]
},
“ApproachList”: {
“value”: “ILS GPS NDB”,
“matchLevel”: “none”,
“matchedWords”:
}
},
“_rankingInfo”: {
“nbTypos”: 1,
“firstMatchedWord”: 41,
“proximityDistance”: 0,
“userScore”: 4278,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 0,
“words”: 1,
“filters”: 0
}
}
],
“nbHits”: 30,
“page”: 0,
“nbPages”: 3,
“hitsPerPage”: 10,
“processingTimeMS”: 1,
“facets”: {},
“exhaustiveFacetsCount”: true,
“exhaustiveNbHits”: true,
“query”: “cykz”,
“params”: “query=cykz&hitsPerPage=10&page=0&analytics=false&attributesToRetrieve=&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=true&responseFields=&facets=*%2C&tagFilters=”,
“index”: “Airports”,
“serverUsed”: “c1-ca-2.algolia.net”,
“indexUsed”: “Airports”,
“parsedQuery”: “cykz”,
“timeoutCounts”: false,
“timeoutHits”: false
}

Any help here yet guys?? @vvo

Hi @justincrabbe, have a look at @vvo’s response:

If you keep having an issue, please publish a live example and provide reproducible steps via a template here: https://github.com/algolia/create-instantsearch-app#previews.

Once you have a live example of your issue (e.g. deployed on codesandbox), please share here its link with steps to reproduce the issue, for example:

  1. [STEP] Type “TORONTO”
  2. [RESULT] See the records displayed: field ApproachList is missing

Regarding attributesToRetrieve, this parameter specifies a whitelist of fields returned by the engine. Can you check its value in your settings? It should be unset by default, but as your Explorer screenshot does not display all attributes from the text records you shared, I would confirm this parameter is unset.

Thanks.

Settings for attributesToretrieve appear correct:

image

Could you please tell me what we are viewing here in the image below and where it comes from?

Shouldn’t all fields be present in this?

Is there a setting somewhere inside of Algolia that is telling it to only output these 8 fields of about 30?

The same query in RAW view has all of the response that we need outlined in the json:

Hi @justincrabbe,

Thanks for following up!

We’ll clarify what we need via email as we are still looking for more information from your end. However, I also want to further clarify that as a Community user, public, open-source answers from the community are your official level of support.

Lookout for our reply via email! Thanks.

1 Like