Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40691

$nin:[[],...] queries are not indexed

    • Fully Compatible
    • ALL
    • v5.3, v5.2, v5.0, v4.4, v4.2
    • Hide
      1. Create an index for an Array field
      2. Run a query for $nin: [[], null] on that field
      3. Observe that a No query solutions occurs, even though an index was created, because the query no longer respects the index.
      Show
      Create an index for an Array field Run a query for $nin: [[], null] on that field Observe that a No query solutions occurs, even though an index was created, because the query no longer respects the index.
    • Query Optimization 2021-05-17, Query Optimization 2021-06-14, Query Optimization 2021-06-28, Query Optimization 2021-07-12, Query Optimization 2021-07-26, QO 2021-09-06, Query Optimization 2021-08-09, QO 2021-09-20, QO 2021-10-04, QO 2021-10-18, QO 2021-11-01, QO 2021-11-15, QO 2021-11-29, QO 2021-12-13, QO 2021-12-27, QO 2022-01-10, QO 2022-01-24, QO 2022-02-07, QO 2022-02-21, QO 2022-03-07, QO 2021-08-23

      Since v4.0.9, $nin queries containing arrays are no longer possible when the notablescan setting is enabled on the server. The server will always throw a "No query solutions" error, due to SERVER-38949.

      original description

      Since v4.0.9, $nin queries are no longer possible when the notablescan setting is enabled on the server. The server will always throw a "No query solutions" error, because indexes made for the fields being queried are not respected for a $nin query, resulting in a full-table scan and the error. This is most likely due to SERVER-38949

       

       

            Assignee:
            jess.balint@mongodb.com Jess Balint
            Reporter:
            tubbo Tom Scott
            Votes:
            1 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: