Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-3681

Not all $searchBeta operator clauses supported in Compass Dev build

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.19.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Iteration Ferret

      Only the `search` clause in the `$searchBeta` operator appears to work correctly.

      A query like this will work:

      {
            search: {
              path: "title",
              query: "The Godfather",
              phrase: {}
            }
          }
      
      

      However, `search` is only one of many clauses that the $searchBeta operator supports. Others that are not working include `term`, `compound` and `span`. For example, this is a valid query that returns the error `Expected "[" or AggregationStage but "{" found.` in the Compass UI:

      {
            "compound": {
              "should": [{
                "term": {
                  "query": "indaina",
                  "path": "title",
       fuzzy: {maxEdits:2}
                }
              },
              {
                "search": {
                  "query": "jones",
                  "path": "title"
                }
              }],
            }
          }
      

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            tim.frietas@mongodb.com Timothy Frietas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: