Permalink
Browse files

Added comment to the effect that the query optimizer can use index fo…

…r string queries involving rooted regular expressions.
  • Loading branch information...
1 parent 2caf888 commit 8130469343891474a2239a7ca8822804f43e68c0 rstam committed Apr 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Driver/Linq/Translators/SelectQuery.cs
@@ -829,7 +829,7 @@ private IMongoQuery BuildStringQuery(MethodCallExpression methodCallExpression)
{
case "Contains": pattern = ".*" + pattern + ".*"; break;
case "EndsWith": pattern = ".*" + pattern; break;
- case "StartsWith": pattern = pattern + ".*"; break;
+ case "StartsWith": pattern = pattern + ".*"; break; // query optimizer will use index for rooted regular expressions
default: return null;
}

0 comments on commit 8130469

Please sign in to comment.