Add a public function to check if an exception is related to Atlas Search not supported

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Atlas Testing
    • None
    • None
    • PHP Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      For downstream library, it's useful to be able to detect if an error is due to the lack of support of MongoDB Atlas Search

      In Laravel : https://github.com/mongodb/laravel-mongodb/blob/a2b4ab86dfc9248050b2592d9830773ac335774e/src/Schema/Builder.php#L386-L395 

      In Doctrine : https://github.com/doctrine/mongodb-odm/pull/2787 

      The basic idea is to move this function to PHPLIB, so that we have to maintain it only in one place, and it can be used by other projects.

      But the underlying issue is that we cannot reliably detect if Search indexes are supported. And even if we expose some feature flags in the server info, this will not be available for older MongoDB Server versions with Search support.

            Assignee:
            Jérôme Tamarelle
            Reporter:
            Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: