Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-93857

updateSearchIndex does not work on Local Atlas

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

      The `updateSearchIndex` command fails on local atlas. When run against local atlas, I receive this error: 

      AtlasLocalDev rs-localdev [direct: primary] db> db.runCommand({updateSearchIndex: "data", name: "bird", definition: {'fields': [{'numDimensions': 1025, 'path': 'embeddings', 'similarity': 'euclidean', 'type': 'vector'}]}}) MongoServerError[UnknownError]: "userCommand.mappings" is required

      Local Atlas version is always `

      color: Color value is invalid

      mongodb/mongodb-atlas-local:latest

      color: Color value is invalid

      ` when pulled from podman. The version I've last run this on is 1.25

       

      However, when this same operation is run against cloud atlas, I face no issues:

      Atlas atlas-zk9vnk-shard-0 [primary] sample_mflix> db.embedded_movies.createSearchIndex(
      ...   "vector_index", 
      ...   "vectorSearch", 
      ...   {
      ...     "fields": [
      ...       {
      ...         "type": "vector",
      ...         "path": "plot_embedding",
      ...         "numDimensions": 1536,
      ...         "similarity": "euclidean"
      ...       }
      ...     ]
      ...   }
      ... );
      vector_index
      
      Atlas atlas-zk9vnk-shard-0 [primary] sample_mflix> db.embedded_movies.updateSearchIndex( "vector_index", { "fields": [ { "type": "vector", "path": "plot_embedding", "numDimensions": 1536, "similarity": "cosine" }] } );
      
      Atlas atlas-zk9vnk-shard-0 [primary] sample_mflix> db.embedded_movies.getSearchIndexes();
      [
        {
          id: '66673f50824fa31d585c4720',
          name: 'vector_index',
          type: 'vectorSearch',
          status: 'BUILDING',
          queryable: true,
          latestDefinitionVersion: { version: 1, createdAt: ISODate('2024-06-10T18:01:41.352Z') },
          latestDefinition: {
            fields: [
              {
                type: 'vector',
                path: 'plot_embedding',
                numDimensions: 1536,
                similarity: 'cosine'
              }
            ]
          }, 

      Looking to fix this issue as it is leading to errors in our evergreen testing pipeline for our AI/ML integrations. 

       

            Assignee:
            ted.tuckman@mongodb.com Ted Tuckman
            Reporter:
            jib.adegunloye@mongodb.com Jib Adegunloye
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: