diff options
author | Jason Rassi <rassi@10gen.com> | 2015-06-08 08:22:16 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-06-08 08:22:16 -0400 |
commit | 0e2ba5e2b16b11038940350ca8676ebc1b99698b (patch) | |
tree | 617d8ab8c1e360ddcaca90ec9fe5d9145b92b263 /src/mongo/db | |
parent | 66f165639a514a3ca764bab87dea5e7b1af0825f (diff) | |
download | mongo-0e2ba5e2b16b11038940350ca8676ebc1b99698b.tar.gz |
Revert "SERVER-17660 Rename index option "filter" to "partialIndexExpression""
This reverts commit 66f165639a514a3ca764bab87dea5e7b1af0825f.
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/catalog/collection_info_cache.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/catalog/index_catalog.cpp | 10 | ||||
-rw-r--r-- | src/mongo/db/catalog/index_catalog_entry.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/index/index_descriptor.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/catalog/collection_info_cache.cpp b/src/mongo/db/catalog/collection_info_cache.cpp index a111a9a6684..ed30256319f 100644 --- a/src/mongo/db/catalog/collection_info_cache.cpp +++ b/src/mongo/db/catalog/collection_info_cache.cpp @@ -110,7 +110,7 @@ namespace mongo { } } - // handle partial indexes + // handle filtered indexes const IndexCatalogEntry* entry = i.catalogEntry(descriptor); const MatchExpression* filter = entry->getFilterExpression(); if (filter) { diff --git a/src/mongo/db/catalog/index_catalog.cpp b/src/mongo/db/catalog/index_catalog.cpp index 5f230340b91..cf6c7a90e67 100644 --- a/src/mongo/db/catalog/index_catalog.cpp +++ b/src/mongo/db/catalog/index_catalog.cpp @@ -450,7 +450,7 @@ namespace { case MatchExpression::AND: if (level > 0) return Status(ErrorCodes::CannotCreateIndex, - "$and only supported in partialFilterExpression at top level"); + "$and only supported in filter at top level"); for (size_t i = 0; i < expression->numChildren(); i++) { Status status = _checkValidFilterExpressions(expression->getChild(i), level + 1 ); @@ -468,7 +468,7 @@ namespace { return Status::OK(); default: return Status(ErrorCodes::CannotCreateIndex, - str::stream() << "unsupported expression in partial index: " + str::stream() << "unsupported expression in filtered index: " << expression->toString()); } } @@ -554,16 +554,16 @@ namespace { const bool isSparse = spec["sparse"].trueValue(); // Ensure if there is a filter, its valid. - BSONElement filterElement = spec.getField("partialFilterExpression"); + BSONElement filterElement = spec.getField("filter"); if ( filterElement ) { if ( isSparse ) { return Status( ErrorCodes::CannotCreateIndex, - "cannot mix \"partialFilterExpression\" and \"sparse\" options" ); + "cannot mix \"filter\" and \"sparse\" options" ); } if ( filterElement.type() != Object ) { return Status(ErrorCodes::CannotCreateIndex, - "'partialFilterExpression' for an index has to be a document"); + "'filter' for an index has to be a document"); } StatusWithMatchExpression res = MatchExpressionParser::parse( filterElement.Obj() ); if ( !res.isOK() ) { diff --git a/src/mongo/db/catalog/index_catalog_entry.cpp b/src/mongo/db/catalog/index_catalog_entry.cpp index 358b5a264d7..24c0087b2c9 100644 --- a/src/mongo/db/catalog/index_catalog_entry.cpp +++ b/src/mongo/db/catalog/index_catalog_entry.cpp @@ -101,7 +101,7 @@ namespace mongo { _head = _catalogHead( txn ); _isMultikey = _catalogIsMultikey( txn ); - BSONElement filterElement = _descriptor->getInfoElement("partialFilterExpression"); + BSONElement filterElement = _descriptor->getInfoElement("filter"); if ( filterElement.type() ) { invariant( filterElement.isABSONObj() ); BSONObj filter = filterElement.Obj(); diff --git a/src/mongo/db/index/index_descriptor.h b/src/mongo/db/index/index_descriptor.h index 742e5a3ea16..48b460c1dcb 100644 --- a/src/mongo/db/index/index_descriptor.h +++ b/src/mongo/db/index/index_descriptor.h @@ -68,7 +68,7 @@ namespace mongo { _isIdIndex(isIdIndexPattern( _keyPattern )), _sparse(infoObj["sparse"].trueValue()), _unique( _isIdIndex || infoObj["unique"].trueValue() ), - _partial(!infoObj["partialFilterExpression"].eoo()), + _partial(!infoObj["filter"].eoo()), _cachedEntry( NULL ) { _indexNamespace = makeIndexNamespace( _parentNS, _indexName ); |