Command aggregate failed: $search is not allowed with a non-simple collation

This issue occurred from 19:04/13/2023 UTC and is no longer happening now

[
  {
    $search: {
      compound: {
        should: [
          {
            phrase: {
              query: "bonding",
              path: "name",
              score: { boost: { value: 1.0 } },
            },
          },
          {
            phrase: {
              query: "bonding",
              path: "sections.content",
              score: {
                boost: {
                  value: 0.10000000000000001,
                },
              },
            },
          },
          {
            phrase: {
              query: "bonding",
              path: "tags",
              score: {
                boost: {
                  value: 0.59999999999999998,
                },
              },
            },
          },
        ],
      },
      highlight: {
        path: [
          "name",
          "sections.content",
          "tags",
        ],
      },
      index: "law_summary_search",
    },
  },
  {
    $match: {
      isDeleted: false,
      isActive: true,
      $or: [
        { excludedFromSearchResult: false },
        { excludedFromSearchResult: null },
      ],
      "state.key": { $in: ["CA"] },
    },
  },
  {
    $project: {
      name: 1,
      sections: 1,
      tags: 1,
      state: 1,
      categoryId: 1,
      country: 1,
      county: 1,
      city: 1,
      topicId: 1,
      epic: 1,
      score: { $meta: "searchScore" },
      highlights: { $meta: "searchHighlights" },
    },
  },
  { $sort: { score: { $meta: "textScore" } } },
  { $skip: NumberLong(0) },
  { $limit: NumberLong(12) },
]

Hello @Long_Van ,

Welcome to The MongoDB Community Forums! :wave:

  • Was this the first time you saw this issue?
  • Did you do any changes to resolve this issue?

Also, could you contact the Atlas in-app chat support team regarding this? Please provide them with the errors you’re receiving as well.

Regards,
Tarun

Hi @Tarun_Gaur ,

Yes, this is the first time I see this issue.

I didn’t do any changes to resolve this issue.

Thanks,
Long