Block search index creation on invalid view definitions

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, search indexes should only be able to be created on views that contain `$addFields`, `$match`, or `$expr`. Additionally, within those stages `$rand`, `$function`, `$$NOW`, `$$USER_ROLES`, and `$$CLUSTER_TIME` cannot be used.

      Users trying to create a search index on a view that breaks any of these rules should be blocked prior to sending anything to MMS or mongot.

      `$project` will also be allowed in the view definition as it's likely the next stage to be allowed for search indexes on views. This is in an effort to prevent future backports. Until it's enabled by `mongot`, this stage will still be blocked, just not on the server end.

            Assignee:
            Josh Siegel
            Reporter:
            Josh Siegel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: