You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expert Query Support for MongoDB Clusters: Feedback and Collaboration Welcome! 🚀
Summary
The current Collection View supports only a simple find filter query. While this provides a basic interface for querying documents, it lacks flexibility and limits the user’s ability to refine or customize queries. This RFC proposes exploring and potentially implementing two scenarios to enhance query capabilities:
Enhanced Entry-Level Mode: Extend the existing find filter by adding support for projection and sort fields.
Expert Mode: Introduce a free-text query input with intellisense support, providing advanced users with a more powerful querying experience.
Details
Scenario 1: Enhanced Entry-Level Mode
The current query filter would be expanded to include:
Projection: Specify which fields to include or exclude in the output.
Example: { "name": 1, "age": 1 } to include only the name and age fields.
Sort: Define sorting for query results.
Example: { "age": -1 } to sort results by age in descending order.
This mode caters to users seeking simple but slightly more refined queries without overwhelming complexity.
Scenario 2: Expert Mode
Introduce an expert mode allowing free-text input for more advanced query construction. This would include:
Intellisense Support: Assist users with suggestions, syntax completion, and validation.
Advanced Query Features: Decide whether to limit inputs to the find syntax or support additional MongoDB query features such as:
Aggregation Pipelines: Enabling transformations and complex queries in the same interface.
Update Queries: Allowing modifications directly from the query view.
Example: { $set: { status: "active" } }
Discussion Areas
Complexity vs. Need
Simple Queries: The current focus of the Collection View is data exploration. Does adding advanced query capabilities dilute its purpose?
Advanced Queries: For complex operations, is it sufficient to rely on existing shell integration, which already supports full MongoDB syntax but lacks the user-friendly representation of the Collection View?
Integration of Advanced Features
Should the expert mode be limited to find syntax to maintain simplicity, or should it support a broader range of MongoDB features?
What would be the key use cases for extending beyond find? For instance:
Aggregation pipelines for pre-processing data in view.
Update queries for making live changes during data exploration.
User Experience
How should the expert mode be presented? Would a toggle between "Basic" and "Expert" modes suffice?
Should query history and saved queries be part of this feature?
Argument Against Advanced Features
An argument against a more complex expert mode is the existing integration of shell support, which allows executing any MongoDB query. However, the shell lacks the modern data representation and visualization provided by the Collection View. This raises the question:
Is there a need for advanced query capabilities within the Collection View, or should its purpose remain primarily data exploration?
Next Steps
Evaluate user demand for enhanced entry-level and expert modes through community feedback and usage patterns.
Prototype the two scenarios to assess feasibility and user experience:
Entry-level mode with projection and sort fields.
Expert mode with intellisense and free-text input for queries.
Define boundaries for the expert mode (e.g., find syntax only vs. advanced MongoDB features).
Compare against existing shell integration to determine overlap and necessity.
Conclusion
While the enhanced entry-level mode is a clear value-add for most users, the expert mode requires careful consideration of its scope and alignment with the Collection View's primary purpose: viewing and exploring data.
Feedback is welcome on:
The need for advanced query capabilities in the Collection View.
The balance between simplicity and power in query construction.
Whether to prioritize basic enhancements, expert mode, or both.
The text was updated successfully, but these errors were encountered:
Expert Query Support for MongoDB Clusters: Feedback and Collaboration Welcome! 🚀
Summary
The current Collection View supports only a simple
find
filter query. While this provides a basic interface for querying documents, it lacks flexibility and limits the user’s ability to refine or customize queries. This RFC proposes exploring and potentially implementing two scenarios to enhance query capabilities:find
filter by adding support for projection and sort fields.Details
Scenario 1: Enhanced Entry-Level Mode
The current query filter would be expanded to include:
{ "name": 1, "age": 1 }
to include only thename
andage
fields.{ "age": -1 }
to sort results by age in descending order.This mode caters to users seeking simple but slightly more refined queries without overwhelming complexity.
Scenario 2: Expert Mode
Introduce an expert mode allowing free-text input for more advanced query construction. This would include:
find
syntax or support additional MongoDB query features such as:{ $match: { age: { $gt: 30 } } }, { $group: { _id: "$city", avgAge: { $avg: "$age" } } }
{ $set: { status: "active" } }
Discussion Areas
Complexity vs. Need
Integration of Advanced Features
find
syntax to maintain simplicity, or should it support a broader range of MongoDB features?find
? For instance:User Experience
Argument Against Advanced Features
An argument against a more complex expert mode is the existing integration of shell support, which allows executing any MongoDB query. However, the shell lacks the modern data representation and visualization provided by the Collection View. This raises the question:
Next Steps
find
syntax only vs. advanced MongoDB features).Conclusion
While the enhanced entry-level mode is a clear value-add for most users, the expert mode requires careful consideration of its scope and alignment with the Collection View's primary purpose: viewing and exploring data.
Feedback is welcome on:
The text was updated successfully, but these errors were encountered: