Deprecate $searchBeta

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      $searchBeta currently maps to the same logic as $search in the server. $search is moving to an extension but we are making the choice to not move $searchBeta to an extension (a stage descriptor that maps to the search parse node) in favor of deprecating $searchBeta in v9.0.

      This ticket should involve logging a warning to the user on every 128th call to $searchBeta:

       In document_source_search.cpp:

      Rarely _samplerSearchBeta;
      
      std::unique_ptr<SearchLiteParsed> parseSearchBeta(const NamespaceString& nss,
          const BSONElement& spec,
          const LiteParserOptions& options) {
       // Fires every 128 calls.
       if (_samplerSearchBeta.tick()) {
       // LOGV2_WARNING
       }
      
       return SearchLiteParsed::parse(nss, spec, options);
      }
      
      REGISTER_LITE_PARSED_DOCUMENT_SOURCE(searchBeta,
                                           parseSearchBeta,
                                           AllowedWithApiStrict::kNeverInVersion1); 

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

              Created:
              Updated:
              Resolved: