diff options
Diffstat (limited to 'src/mongo/db/matcher/expression_text.cpp')
-rw-r--r-- | src/mongo/db/matcher/expression_text.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/matcher/expression_text.cpp b/src/mongo/db/matcher/expression_text.cpp index 8c8bd979cf8..9dcf093e591 100644 --- a/src/mongo/db/matcher/expression_text.cpp +++ b/src/mongo/db/matcher/expression_text.cpp @@ -41,7 +41,7 @@ namespace mongo { -Status TextMatchExpression::init(OperationContext* txn, +Status TextMatchExpression::init(OperationContext* opCtx, const NamespaceString& nss, TextParams params) { _ftsQuery.setQuery(std::move(params.query)); @@ -52,9 +52,9 @@ Status TextMatchExpression::init(OperationContext* txn, fts::TextIndexVersion version; { // Find text index. - ScopedTransaction transaction(txn, MODE_IS); - AutoGetDb autoDb(txn, nss.db(), MODE_IS); - Lock::CollectionLock collLock(txn->lockState(), nss.ns(), MODE_IS); + ScopedTransaction transaction(opCtx, MODE_IS); + AutoGetDb autoDb(opCtx, nss.db(), MODE_IS); + Lock::CollectionLock collLock(opCtx->lockState(), nss.ns(), MODE_IS); Database* db = autoDb.getDb(); if (!db) { return {ErrorCodes::IndexNotFound, @@ -70,7 +70,7 @@ Status TextMatchExpression::init(OperationContext* txn, << "')"}; } std::vector<IndexDescriptor*> idxMatches; - collection->getIndexCatalog()->findIndexByType(txn, IndexNames::TEXT, idxMatches); + collection->getIndexCatalog()->findIndexByType(opCtx, IndexNames::TEXT, idxMatches); if (idxMatches.empty()) { return {ErrorCodes::IndexNotFound, "text index required for $text query"}; } |