-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
Affects Version/s: 4.11.0
-
Component/s: None
-
None
-
None
-
Java Drivers
-
None
-
None
-
None
-
None
-
None
-
None
The current driver Search Index Management API passes name and type directly via SearchIndexModel constructors and related helper methods. That differs from the latest spec direction, which moves these fields into SearchIndexOptions, and is also inconsistent with the IndexModel / IndexOptions pattern used for regular indexes.
This direction was previously discussed in PR#1438 and agreed in principle as the preferred long-term API shape.
This ticket is to decide and implement the appropriate 6.0 API direction for the Search Index Management API.
Options to evaluate
- Introduce SearchIndexOptions and move name / type off SearchIndexModel and related helpers.
- Introduce the placeholder options types (CreateSearchIndexOptions, UpdateSearchIndexOptions, ListSearchIndexOptions, DropSearchIndexOptions) where appropriate. This approach is similar to Client Bulk Write API and should be considered for consistency.
See JAVA-5737 -applied the same pattern to Client Bulk Write options: splitting a unified ClientUpdateOptions / ClientDeleteOptions into operation-specific classes for API clarity, as otherwise the options specific to the updateOne operation would have existed on updateMany as no-ops. This approach follows the same reasoning for the Search Index Management API.
- related to
-
JAVA-5627 clarify search index management API overloads
-
- Closed
-