[SERVER-10857] Improve error checking of text index spec and text-indexed documents Created: 23/Sep/13  Updated: 05/Nov/15  Resolved: 09/Dec/13

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: 2.5.2
Fix Version/s: 2.5.5

Type: Improvement Priority: Major - P3
Reporter: J Rassi Assignee: J Rassi
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-10906 Support for legacy text index format ... Closed
is related to SERVER-10150 Inconsistent / missing text search re... Closed
is related to SERVER-12070 Validate all indexes for new restrict... Closed
Participants:

 Description   

Proposed behavior:

  • Fail text index build if any part of the index spec (key, default_language, language_override, weights, textIndexVersion) has an invalid value, or a document is found with an invalid language.
  • Fail insert if document has an invalid language.

Current behavior if an invalid value is found is to silently ignore it and fall back to defaults.



 Comments   
Comment by Githook User [ 09/Dec/13 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-10857 Test: text indexes validate documents' language_override
Branch: master
https://github.com/mongodb/mongo/commit/6ea28a261ff80e27cf0accaca421df3b13e3b20b

Comment by Githook User [ 06/Dec/13 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-10857 Validate various text index spec options

Implements validation for text spec options:

Comment by Githook User [ 04/Dec/13 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-10857 Remove support for now-broken "fts" index alias

Originally text indexes were created with ensureIndex(

{a:"fts"}

).
The index name was changed to "text" before 2.4 was
shipped/documented.
Branch: master
https://github.com/mongodb/mongo/commit/57a4f1697eebfeac1294dd740a1e3e3c4356d74a

Comment by Githook User [ 04/Dec/13 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-10857 Remove erroneous IndexName::TEXT_INTERNAL
Branch: master
https://github.com/mongodb/mongo/commit/84a20358b16eb9cbe92d9d55014d9e0cc0606f35

Comment by Githook User [ 13/Nov/13 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-9932 SERVER-10857 Text search language aliases/validation

Users can now use two-letter language codes and can specify
languages in mixed case.

The following operations will now fail if they do not pass language
validation:

  • Building a text index (if default_language fails validation or if
    the target collection contains a document with a language that
    fails validation).
  • Inserting a document into a text-indexed collection (if it
    specifies a language that fails validation).
  • A text query or text command (if it specifies a language that
    fails validation).
    Branch: master
    https://github.com/mongodb/mongo/commit/075ff3c615cc9c53aab272af32a180d9f1ceda4a
Comment by auto [ 13/Nov/13 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-9932 SERVER-10857 Text search language aliases/validation

Users can now use two-letter language codes and can specify
languages in mixed case.

The following operations will now fail if they do not pass language
validation:

  • Building a text index (if default_language fails validation or if
    the target collection contains a document with a language that
    fails validation).
  • Inserting a document into a text-indexed collection (if it
    specifies a language that fails validation).
  • A text query or text command (if it specifies a language that
    fails validation).
    Branch: master
    https://github.com/mongodb/mongo/commit/075ff3c615cc9c53aab272af32a180d9f1ceda4a
Generated at Thu Feb 08 03:24:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.