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

Text query parsing should be moved to TextMatchExpression::init()

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc4
    • Affects Version/s: None
    • Component/s: Querying, Text Search
    • None
    • Minor Change
    • QuInt B (11/02/15), QuInt C (11/23/15)

      Parsing of text queries is currently performed as part of query execution stage building in StageBuilder::build(). This is a problem because StageBuilder::build() is not expected to fail.

      This problem should be addressed by moving text query parsing to its natural home, TextMatchExpression::init(). Unfortunately, parsing text queries requires access to the collection's default language; thus, TextMatchExpression needs to be given access to a OperationContext that it can use to determine the default language. To accomplish this, a new argument should be added the MatchExpressionParser constructor of type MatchExpressionParser::TextCallback, which wraps an OperationContext* and exposes a public method parseText() (see the definition of MatchExpressionParser::WhereCallback, which exposes a similar mechanism).

            Assignee:
            rassi J Rassi
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: