diff options
author | Jason Rassi <rassi@10gen.com> | 2015-06-08 07:50:48 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-06-08 07:50:48 -0400 |
commit | 66f165639a514a3ca764bab87dea5e7b1af0825f (patch) | |
tree | 19bbb236a4a5e0ecc80ccf02363cfa7fa3e63323 /src | |
parent | 5bf56982d557a6c4e7d156b1e525950dd7960684 (diff) | |
download | mongo-66f165639a514a3ca764bab87dea5e7b1af0825f.tar.gz |
SERVER-17660 Rename index option "filter" to "partialIndexExpression"
Diffstat (limited to 'src')
-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 ed30256319f..a111a9a6684 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 filtered indexes + // handle partial 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 cf6c7a90e67..5f230340b91 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 filter at top level"); + "$and only supported in partialFilterExpression 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 filtered index: " + str::stream() << "unsupported expression in partial 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("filter"); + BSONElement filterElement = spec.getField("partialFilterExpression"); if ( filterElement ) { if ( isSparse ) { return Status( ErrorCodes::CannotCreateIndex, - "cannot mix \"filter\" and \"sparse\" options" ); + "cannot mix \"partialFilterExpression\" and \"sparse\" options" ); } if ( filterElement.type() != Object ) { return Status(ErrorCodes::CannotCreateIndex, - "'filter' for an index has to be a document"); + "'partialFilterExpression' 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 24c0087b2c9..358b5a264d7 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("filter"); + BSONElement filterElement = _descriptor->getInfoElement("partialFilterExpression"); 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 48b460c1dcb..742e5a3ea16 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["filter"].eoo()), + _partial(!infoObj["partialFilterExpression"].eoo()), _cachedEntry( NULL ) { _indexNamespace = makeIndexNamespace( _parentNS, _indexName ); |