Query with category that uses double space have no results

I’m facing weird issue as database contains objects with different categories. Some of them are just a single word, some two words and some three words.
For example:

  • category
  • category one
  • test category one

If I use single word category, there is no issues. It is written ‘category’ and everything works fine.
If use category with double space, everything is fine too. According to Algolia doc I’m writing “category one” and it works with no issue.
But problem starts when I’m trying to use one with double space in between words.
If I write “test category one” it doesn’t work. There is no results.
Is there a reason for that or how to fix that?

I’m using InstantSearch JS

To be more specific I’m using disjunctiveFacetsRefinements and setting multiple categories.
Unfortunately those with more than one space doesn’t work.

My example of multiple categories:

category: [‘category’, “category one”, “test category one”];

I’m getting results from “category” and “category one” but not from "test category one"

I appreciate any suggestion.

Part of the code:

if ($('#searchbox').attr('data-category') === 'multi') {
  var productCat = ['Category1', 'Category2', 'Category3', "Test Category"];
} else if ($('#searchbox').attr('data-category') === 'test') {
  var productCat = ["category one", "test category one", 'category'];
} else {
  var productCat = [document.querySelector('#searchbox').getAttribute('data-category')];
}

const search = instantsearch({
  appId: 'XXX',
  apiKey: 'xxxxxxxx',
  indexName: 'index_name',
  searchParameters: {
    hitsPerPage: 38,
    disjunctiveFacetsRefinements: {
      category: productCat,
    },
  },

This is a part of the code with this issue.
Everything worked ok but when start adding more old categories in it, especially those with double space it simply doesn’t work.
Any category without space or with one space works without issue.