Skip to content

Justin

My feedback

4 results found

  1. 81 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Justin commented  · 

    @Cassio Why can't you $match after the $search?

  2. 1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Atlas Search  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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" }]
    }
    }
    ])
    ```

  3. 39 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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...

  4. 352 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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  · 

Feedback and Knowledge Base