Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-22528

Allow limit to be pushed down to text stage in query plans

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Text Search
    • Labels:
    • Query Integration

      I have roughly 3.2 million documents and have created text index on one filed. It took me about an hour to complete index.

      I notice that search is very very slow. I'm executing following statement.

      db.messages.explain("executionStats").find({$text:{$search:"Unfortunately"}},{"body":1}).limit(2)
      

      and it's taking me roughly 2 minutes to return result which is not acceptable for any serious use. I have attached full explain output for your review.

      I'm wondering if there is any way to improve it's performance?

        1. dataset.txt
          0.5 kB
          Saleem
        2. explain_term_terribly (post_warmup).txt
          8 kB
          Saleem
        3. explain_term_terribly (pre_warmup).txt
          8 kB
          Saleem
        4. explain_term_unfortunately (post_warmup).txt
          8 kB
          Saleem
        5. explain_term_unfortunately (pre_warmup).txt
          8 kB
          Saleem
        6. explain.json
          11 kB
          Saleem
        7. getIndexes.txt
          0.8 kB
          Saleem
        8. messages-stats.txt
          8 kB
          Saleem
        9. mongodb-resources_usage.png
          12 kB
          Saleem
        10. mongodb-system-utilization.png
          12 kB
          Saleem
        11. mongodb-threads.png
          30 kB
          Saleem
        12. questionnaire.txt
          0.6 kB
          Saleem
        13. sample_doc.txt
          3 kB
          Saleem
        14. serverBuildInfo.txt
          1 kB
          Saleem
        15. systemInfo.txt
          0.2 kB
          Saleem

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            sixthsense Saleem
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: