Atlas search Flashcards
When using a dynamic index, which fields does an Atlas Search query against? (Select one.)
all of the fields including nested fields
When would you use a dynamically mapped search index? (Select one.)
c. When you want to search all of the fields with equal weight.
If the search index is statically mapped and the only field mapping is for the “storeLocation” field, and you searched for one of the items sold by the office supply company, notepads, how many results will come up? (Select one.)
none. The only field indexed is the location of the store, so data such as the items sold have not been indexed by the search algorithm. Only queries for names of cities present as values in the storeLocation field will be returned.
The following code is a snippet from a search index. What type of field mapping does this search index use? (Select one.)
{
“mappings”: {
“dynamic”: false,
“fields”: {
“common_name”: [
{
“dynamic”: true,
“type”: “document”
},
{
“type”: “string”
}
]
}
}
}
static
Which clauses used by the compound operator contribute to the score given the results? (Select one.)
d. “must”, “must not”, and “should”
What does the “filter” clause do? (Select one.)
b. It eliminates results that match the clause.
$searchMeta and $facet
$searchMeta and $facet
$searchMeta is an aggregation stage for Atlas Search where the metadata related to the search is shown. This means that if our search results are broken into buckets, using $facet, we can see that in the $searchMeta stage, because those buckets are information about how the search results are formatted.
$searchMeta: {
“facet”: {
“operator”: {
“text”: {
“query”: [“Northern Cardinal”],
“path”: “common_name”
}
},
“facets”: {
“sightingWeekFacet”: {
“type”: “date”,
“path”: “sighting”,
“boundaries”: [ISODate(“2022-01-01”),
ISODate(“2022-01-08”),
ISODate(“2022-01-15”),
ISODate(“2022-01-22”)],
“default” : “other”
}
}
}
}
“facet” is an operator within $searchMeta. “operator” refers to the search operator - the query itself. “facets” operator is where we put the definition of the buckets for the facets.
If you want to view the metadata (facets and their count) for Atlas Search, which aggregation stage must you use? (Select one.)
$searchMeta
Which operator can you use to group Atlas search results? (Select one.)
facet