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

            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: