Atlas search Flashcards

1
Q

When using a dynamic index, which fields does an Atlas Search query against? (Select one.)

A

all of the fields including nested fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When would you use a dynamically mapped search index? (Select one.)

A

c. When you want to search all of the fields with equal weight.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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.)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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”
}
]
}
}
}

A

static

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which clauses used by the compound operator contribute to the score given the results? (Select one.)

A

d. “must”, “must not”, and “should”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the “filter” clause do? (Select one.)

A

b. It eliminates results that match the clause.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

$searchMeta and $facet

A

$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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

If you want to view the metadata (facets and their count) for Atlas Search, which aggregation stage must you use? (Select one.)

A

$searchMeta

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which operator can you use to group Atlas search results? (Select one.)

A

facet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly