Skip to content

Commit

Permalink
feat(NODE-5319): mark search index api public (#3741)
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson authored Jun 26, 2023
1 parent d8a5271 commit c015e54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
12 changes: 0 additions & 12 deletions src/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,6 @@ export class Collection<TSchema extends Document = Document> {
}

/**
* @internal
*
* Returns all search indexes for the current collection.
*
* @param options - The options for the list indexes operation.
Expand All @@ -1060,8 +1058,6 @@ export class Collection<TSchema extends Document = Document> {
*/
listSearchIndexes(options?: ListSearchIndexesOptions): ListSearchIndexesCursor;
/**
* @internal
*
* Returns all search indexes for the current collection.
*
* @param name - The name of the index to search for. Only indexes with matching index names will be returned.
Expand All @@ -1087,8 +1083,6 @@ export class Collection<TSchema extends Document = Document> {
}

/**
* @internal
*
* Creates a single search index for the collection.
*
* @param description - The index description for the new search index.
Expand All @@ -1102,8 +1096,6 @@ export class Collection<TSchema extends Document = Document> {
}

/**
* @internal
*
* Creates multiple search indexes for the current collection.
*
* @param descriptions - An array of `SearchIndexDescription`s for the new search indexes.
Expand All @@ -1120,8 +1112,6 @@ export class Collection<TSchema extends Document = Document> {
}

/**
* @internal
*
* Deletes a search index by index name.
*
* @param name - The name of the search index to be deleted.
Expand All @@ -1136,8 +1126,6 @@ export class Collection<TSchema extends Document = Document> {
}

/**
* @internal
*
* Updates a search index by replacing the existing index definition with the provided definition.
*
* @param name - The name of the search index to update.
Expand Down
4 changes: 2 additions & 2 deletions src/cursor/list_search_indexes_cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { Collection } from '../collection';
import type { AggregateOptions } from '../operations/aggregate';
import { AggregationCursor } from './aggregation_cursor';

/** @internal */
/** @public */
export type ListSearchIndexesOptions = AggregateOptions;

/** @internal */
/** @public */
export class ListSearchIndexesCursor extends AggregationCursor<{ name: string }> {
/** @internal */
constructor(
Expand Down
6 changes: 4 additions & 2 deletions src/operations/search_indexes/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import type { ClientSession } from '../../sessions';
import type { Callback } from '../../utils';
import { AbstractOperation } from '../operation';

/** @internal */
/**
* @public
*/
export interface SearchIndexDescription {
/** The name of the index. */
name?: string;

/** The index definition. */
description: Document;
definition: Document;
}

/** @internal */
Expand Down

0 comments on commit c015e54

Please sign in to comment.