Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NODE-5319): mark search index api public #3741

Merged
merged 1 commit into from Jun 26, 2023
Merged

feat(NODE-5319): mark search index api public #3741

merged 1 commit into from Jun 26, 2023

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Jun 22, 2023

Description

What is changing?

The search index API is marked public.

Also, @lerouxb noticed that the definition for SearchIndexModel was incorrect, although the code path (and our unified tests) do assert on the correct value at runtime. This PR fixes the type.

Is there new documentation needed for these changes?

Yes, docsp ticket.

What is the motivation for this change?

Release Highlight

Programmatic management of search indexes

This PR adds support for managing search indexes (creating, updating, deleting and listing indexes). The new methods are available on the Collection class.

const indexes = await collection.listSearchIndexes().toArray(); // produces an array of search indexes
await collection.createSearchIndex({ name: 'my-index', definition: < index definition > } ); 
await collection.updateSearchIndex('my-index', < new definition >);
await collection.dropSearchIndex('my-index');

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@durran durran self-assigned this Jun 23, 2023
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jun 23, 2023
Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the test changes commit intended to be part of this? Could we just limit it to the API changes and move that commit to a new branch for the next steps?

@baileympearson
Copy link
Contributor Author

@durran That was unintentional - somehow I had an extra commit from my search indexes work on main. I've rebased it away now

@durran durran added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Jun 26, 2023
@durran durran merged commit c015e54 into main Jun 26, 2023
20 of 26 checks passed
@durran durran deleted the NODE-5319 branch June 26, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
3 participants