# FAQ

# How to omit adapters and create raw requests and receive raw responses from Algolia?

Use the useRaw parameter to omit the adapter and send a request directly to Algolia. It returns the raw responses from the API without using the transform and normalize methods from registered adapters.

await search({
  query: '',
  useRaw: true
})

# How to use disjunctive faceting?

There are 2 ways of using use disjunctive faceting. One way is to add facets to the disjunctiveFacets array in the middleware.config.js file:

disjunctiveFacets: [
  'color'
]

Alternatively, you can add the disjunctiveFacets array field to the search method parameters:

// Searching for blue t-shirts and populating color facets in a disjunctive way
await search({
  query: 't-shirt',
  parameters: {
    page: 2,
    facetFilters: ['color:blue']
    disjunctiveFacets: ['color']
  }
})

# How can I use UI-heavy features like autocomplete?

This integration supports features like:

You can add advanced UI-heavy features like autocomplete (opens new window) using Algolia's shares frontend libraries.

# No response on Category's view

If you are not getting any results on the Category page using the commercetools adapter, the first thing you should do is check the logs.

If you see an error like the one below, it means that your configuration is not proper. Likely it's missing a disjunctiveFilters configuration. If adding it doesn't help, make sure to check adapter's configuration.

 ERROR  Cannot convert undefined or null to object

  at Function.keys (<anonymous>)
  at _buildFacetFilters (node_modules/@vsf-enterprise/algolia-commercetools/lib/index.cjs.js:138:32)
  at node_modules/@vsf-enterprise/algolia-commercetools/lib/index.cjs.js:123:36
  at step (node_modules/@vsf-enterprise/algolia-commercetools/lib/index.cjs.js:65:23)
  at Object.next (node_modules/@vsf-enterprise/algolia-commercetools/lib/index.cjs.js:46:53)
  at node_modules/@vsf-enterprise/algolia-commercetools/lib/index.cjs.js:39:71
  at new Promise (<anonymous>)
  at __awaiter (node_modules/@vsf-enterprise/algolia-commercetools/lib/index.cjs.js:35:12)
  at fetchCategoriesByPaths (node_modules/@vsf-enterprise/algolia-commercetools/lib/index.cjs.js:117:12)
  at node_modules/@vsf-enterprise/algolia-commercetools/lib/index.cjs.js:438:38