Consider having $vectorSearch error in the absence of an index

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Quoting Run Vector Search Queries documentation for the index option to the $vectorSearch aggregation stage:

      Atlas Vector Search doesn't return results if you misspell the index name or if the specified index doesn't already exist on the cluster.

      I cannot speak for applications, but this is a pain point for some drivers and ODM integrations (e.g. PHPORM-388), as it is difficult to distinguish an unconfigured index from an actual query that returns no results, or an index that has been asynchronously created and is still building. It looks like this concern was also raised in SERVER-102763.

      CLOUDP-205460, which refers to Search Tester, may be related. There, the reporter noted an inconsistency with $vectorSearch not reporting an error and returning no results as compared to $search in the absence of a required index.

      Offhand, I'm not sure how the behavior of $vectorSearch compares to $search, in the absence of a full-text search index having been created. That would be something to consider, though.

            Assignee:
            Unassigned
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: