fix(search): replace placeholder data returns with Atlas SDK limitati… #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…on errors (#4)
Replace all placeholder data implementations in search service methods with proper error messages that inform users about Atlas Admin API limitations.
Changes Made:
GetSearchAnalyzers()to return error instead of placeholder dataGetSearchFacets()to return error instead of placeholder dataextractAnalyzersFromDefinition()extractFacetsFromDefinition()analyzeIndexDefinition()Affected Methods:
GetSearchAnalyzers: Returns error about SDK not exposing analyzer detailsGetSearchFacets: Returns error about SDK not exposing facet detailsGetSearchMetrics: Already properly returns limitation error (unchanged)AnalyzeSearchIndex: Already properly returns limitation error (unchanged)ValidateSearchQuery: Already properly returns limitation error (unchanged)Error Message Pattern:
All errors now follow consistent format:
Files Modified:
internal/services/atlas/search.go: Core service method changes (-84 lines)cmd/atlas/search/search.go: Minor comment updatesinternal/output/advanced_search.go: Retained placeholder handling for compatibilityBackward Compatibility: Yes - methods still exist but now return informative errors
This change prevents users from receiving misleading placeholder data and provides clear guidance on how to access these features through the Atlas UI.
Refs: Atlas SDK limitation handling