Skip to content

chore(compass-indexes): align default index names with cloud COMPASS-9257#7784

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/implement-compass-9257
Closed

chore(compass-indexes): align default index names with cloud COMPASS-9257#7784
Copilot wants to merge 2 commits intomainfrom
copilot/implement-compass-9257

Conversation

Copy link

Copilot AI commented Feb 11, 2026

Vector search indexes in Atlas use vector_index as the default name, while Compass uses default. This creates inconsistency between the two interfaces.

Changes

  • Modified onChangeSearchIndexType callback to auto-update index names when switching search types:

    • defaultvector_index when switching to vector search
    • vector_indexdefault when switching to regular search
    • Custom names are preserved (only default names are swapped)
  • Updated test expectations for vector search default name and added coverage for:

    • Bidirectional name switching with defaults
    • Custom name preservation during type changes

Implementation

const onChangeSearchIndexType = useCallback(
  ({ target: { value } }: React.ChangeEvent<HTMLInputElement>) => {
    setSearchIndexType(value as SearchIndexType);

    if (value === 'vectorSearch') {
      setIndexDefinition(ATLAS_VECTOR_SEARCH_TEMPLATE.snippet);
      onChangeTemplate(ATLAS_VECTOR_SEARCH_TEMPLATE);
      
      if (indexName === 'default') {
        setIndexName('vector_index');
      }
    } else {
      setIndexDefinition(ATLAS_SEARCH_TEMPLATES[0].snippet);
      onChangeTemplate(ATLAS_SEARCH_TEMPLATES[0]);
      
      if (indexName === 'vector_index') {
        setIndexName('default');
      }
    }
  },
  [setSearchIndexType, onChangeTemplate, setIndexDefinition, setIndexName, indexName]
);

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • jira.mongodb.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: mcasimir <334881+mcasimir@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement feature for COMPASS-9257 chore(compass-indexes): align default index names with cloud COMPASS-9257 Feb 11, 2026
Copilot AI requested a review from mcasimir February 11, 2026 10:29
@mcasimir mcasimir closed this Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants