Skip to content

is it possible to set responseFields with algoliasearch(APP,KEY).search(requestsObject) #1404

@cmgchess

Description

@cmgchess

https://codepen.io/cmgchess/pen/oNGmqWE

is it possible to set the response field via this setup. the requests is what is generated and sent from the algoliasearch-helper library

const algoliasearch = require('algoliasearch');
const client = algoliasearch(ALGOLIA_APP,ALGOLIA_KEY);
const responseFields = ['hits','facets','nbHits','page','nbPages'];

//inside async function 
results = await client.search(requests,{responseFields}); //didn't work

the docs show it for the initIndex and then search but not for the above setup in https://www.algolia.com/doc/api-reference/api-parameters/responseFields/

is there a way to set responseFields for the above setup or should i write my own logic to remove fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions