query suggest()

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      So I think for a real basic implementation we could do this:

      • add all exact matches in query to beginning of the "best" index
      • if we have a sort, then add the sort fields, we're done
      • if no sort, add $in fields
      • then we're left with ranges - do a table scan to see which range would result in the fewest nscanned, given constraints already present earlier in the index. We could yield during the scan - data consistency doesn't matter for this

      Wouldn't handle various things like compound key ranges, but I think this would be a decent starting point for helping people out.

            Assignee:
            Unassigned
            Reporter:
            Aaron Staple (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: