Allow users to opt-out of schema sampling

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.6
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Iteration F (Jun 30 - Jul 14)
    • Needed
    • Hide

      There is a new config option called disableSchemaSampling. It is an optional boolean and it defaults to false.

      The new autocomplete (currently still feature-flagged) samples some documents in a collection to infer the schema in the same way that compass' schema tab does. This is used to determine the fields in a document in a collection so that they can become autocomplete suggestions. This sampling happens the first time autocomplete is invoked (with the tab key) for a given collection.

      With disableSchemaSampling set to true it won't do that and it assumes an empty schema. ie. autocomplete would proceed as if the collection is empty.

      For now users won't encounter the new autocompleter because it is still feature-flagged. You have to set the environment USE_NEW_AUTOCOMPLETE=true when launching mongosh to use the new autocompleter, otherwise you still get the old autocompleter.

      We'll have a release out that contains the feature-flagged new autocompleter soon.  (This feature flag already exists in the most recent release, but the functionality isn't complete). Then in a release some time after that (depending on user feedback) we plan to make the new one the default.

      Show
      There is a new config option called disableSchemaSampling . It is an optional boolean and it defaults to false. The new autocomplete (currently still feature-flagged) samples some documents in a collection to infer the schema in the same way that compass' schema tab does. This is used to determine the fields in a document in a collection so that they can become autocomplete suggestions. This sampling happens the first time autocomplete is invoked (with the tab key) for a given collection. With disableSchemaSampling set to true it won't do that and it assumes an empty schema. ie. autocomplete would proceed as if the collection is empty. For now users won't encounter the new autocompleter because it is still feature-flagged. You have to set the environment USE_NEW_AUTOCOMPLETE=true when launching mongosh to use the new autocompleter, otherwise you still get the old autocompleter. We'll have a release out that contains the feature-flagged new autocompleter soon.  (This feature flag already exists in the most recent release, but the functionality isn't complete). Then in a release some time after that (depending on user feedback) we plan to make the new one the default.
    • Developer Tools

            Assignee:
            Le Roux Bodenstein
            Reporter:
            Le Roux Bodenstein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: