FAQ: Atlas Search
On this page
- Are there any charges for enabling and using Atlas Search?
- Can I run partial string matching Atlas Search queries?
- Can I perform case-insensitive search with the
wildcard
orregex
operator? - Does
storedSource
support case-insensitive collation on fields? - Can I use the shard key to run Atlas Search queries on specific shard(s)?
- Do queries run on primary or secondary nodes?
- Does Atlas Search store my entire index in memory?
- Why is my search index disappearing?
- Can I restore Atlas Search indexes from Cloud Backup snapshots?
- Does Atlas Search work with CSFLE encrypting clients?
- Can I query CSFLE encrypted data?
Are there any charges for enabling and using Atlas Search?
No, there are no additional fees or charges for using Atlas Search. However, you might observe an increase in resource utilization on the cluster, depending on factors such as the size of the indexed collections or index definitions.
Tip
Can I run partial string matching Atlas Search queries?
Yes. The following Atlas Search operators support partial string matching queries:
Tip
Can I perform case-insensitive search with the wildcard
or regex
operator?
Yes. You can use the wildcard and regex operators with a custom analyzer to perform a case-insensitive search. You can define a custom analyzer with the following tokenizer and token filter to perform a wildcard case-insensitive search:
Does storedSource
support case-insensitive collation on fields?
Yes. The Atlas Search storedSource option stores
original values. To perform case-insensitive operations after the
$search
stage on the results returned using
returnStoredSource option, you
must set the default collation strength of your collection to 1
or
2
when you create it, and must not specify a different collation in
your queries and indexes.
Can I use the shard key to run Atlas Search queries on specific shard(s)?
No, you can't use the shard key to run Atlas Search queries on a specific shard or a subset of shards. In a sharded cluster environment, Atlas Search queries are scatter-gather queries that run on all the shards.
Do queries run on primary or secondary nodes?
By default, queries run on the primary node. You can configure your read preference or use replica set tags to specify read preference. To learn more, see Atlas Search Overview.
Does Atlas Search store my entire index in memory?
No, Atlas Search uses memory for the JVM heap metrics, which stores the autocomplete and text tokens of your search index. Similar to other database engines, Atlas Search stores the majority of the index files on the disk, which benefits from the underlying OS page cache.
Why is my search index disappearing?
Double check that you entered the correct database and collection names. If you enter a non-existent database or collection name, the Atlas UI temporarily builds the index and deletes it shortly after.
If you use the
$out
aggregation stage to overwrite your collection, you must delete and recreate your search index, as search indexes are not copied to destination collections. To learn more, see $out Index Constraints.
Can I restore Atlas Search indexes from Cloud Backup snapshots?
Atlas can restore Atlas Search indexes from a Cloud Backup snapshot only if both of the following are true:
You restore the Cloud Backup snapshot to the same cluster as the source of the backup.
The Atlas Search index exists in the cluster at the time of restoration. If you delete the Atlas Search index after the snapshot but before the restoration, Atlas can't restore the Atlas Search index from the snapshot.
Otherwise, you must manually rebuild Atlas Search indexes on the cluster.
Does Atlas Search work with CSFLE encrypting clients?
Yes, you can use CSFLE encrypting clients to run Atlas Search queries against data in MongoDB version 6.0 and later.
Can I query CSFLE encrypted data?
No, you can't query CSFLE encrypted data using Atlas Search.