[SERVER-19510] Text query parsing should be moved to TextMatchExpression::init() Created: 21/Jul/15 Updated: 25/Nov/15 Resolved: 18/Nov/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Text Search |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0-rc4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Sprint: | QuInt B (11/02/15), QuInt C (11/23/15) | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
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). |
| Comments |
| Comment by J Rassi [ 18/Nov/15 ] | ||||||||||||||
|
Introduces a minor backwards-breaking change: $text queries against an empty collection now return an error, instead of an empty result set. 3.2.0-rc2 behavior:
New behavior:
| ||||||||||||||
| Comment by Githook User [ 18/Nov/15 ] | ||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message:
Behavior change: $text against a non-existent collection now returns | ||||||||||||||
| Comment by Githook User [ 18/Nov/15 ] | ||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: Groundwork for upcoming change to introduce a "no-op" text query. | ||||||||||||||
| Comment by Githook User [ 18/Nov/15 ] | ||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: Prep work for upcoming changes to src/mongo/db/fts/fts_query.h in | ||||||||||||||
| Comment by Githook User [ 12/Nov/15 ] | ||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: | ||||||||||||||
| Comment by Githook User [ 12/Nov/15 ] | ||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message:
| ||||||||||||||
| Comment by Githook User [ 06/Nov/15 ] | ||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message:
| ||||||||||||||
| Comment by Githook User [ 05/Nov/15 ] | ||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: | ||||||||||||||
| Comment by Githook User [ 05/Nov/15 ] | ||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: |