Justin
My feedback
-
50 votes
An error occurred while saving the comment -
4 votesplanned · 5 comments · Compass » Aggregation pipeline builder · Flag idea as inappropriate… · Admin →
An error occurred while saving the comment Justin commented
That's fine its just that its not actually easier than text, which is why its a requested feature.
There's no reason why you couldn't show sampled results for each pipeline step in text as well. Each individual step is just a little text editor, well maybe let me click a button and now I'm typing an array of steps.
I'm aware of the vscode plugin but it has its own issues I'm dealing with (doesn't actually connect to atlas, not sure why). I'm just trying to give you feedback on how to make this app better, I can't even export or copy+paste the results of the last pipeline step lol. Its driving me nuts.
Justin shared this idea ·
-
22 votes
Work on this feature has begun. Let us know if you have any questions.
Justin shared this idea ·
-
2 votes
An error occurred while saving the comment Justin commented
Its an aggregate pipeline so you can just add a $count pipeline step after the query. If you want the results and the count in the same query then use a facet and a $count like so:
```
db.example.aggregate([
{ $searchBeta: { ... } },
{
$facet: {
results: [{ $project: { ... } }],
total: [{ $count: "total" }]
}
}
])
``` -
34 votes
We have started this work. Please stay tuned for an announcement about its completion.
An error occurred while saving the comment Justin commented
It does for strings. For example if you had the mapping:
```
{
"analyzer": "lucene.standard",
"searchAnalyzer": "lucene.standard",
"mappings": {
"dynamic": false,
"fields": {
"values": {
"fields": {
"stringValue": {
"type": "string"
}
},
"type": "document"
}
}
}
}
```And a document in your db:
```
{
values: [
{ textValue: "here is some example text" }
}
}
```And the query:
```
db.answers.aggregate([
{
$searchBeta: {
near: {
query: "example",
path: "values.textValue"
}
}
}
])
```Then it will work...
-
201 votes
An error occurred while saving the comment Justin commented
Is this an Atlas specific feature? Or will it be available in docker versions of mongo? This is a deal breaker.
Justin supported this idea ·
@Cassio Why can't you $match after the $search?