|
61 | 61 | `object`. The mapping also allows you to define (amongst other things) |
62 | 62 | how the value for a field should be analyzed. |
63 | 63 |
|
| 64 | +[[glossary-filter]] filter :: |
| 65 | + |
| 66 | + A filter is a non-scoring <<glossary-query,query>>, meaning that it does not score documents. |
| 67 | + It is only concerned about answering the question - "Does this document match?". |
| 68 | + The answer is always a simple, binary yes or no. This kind of query is said to be made |
| 69 | + in a <<query-filter-context,filter context>>, |
| 70 | + hence it is called a filter. Filters are simple checks for set inclusion or exclusion. |
| 71 | + In most cases, the goal of filtering is to reduce the number of documents that have to be examined. |
| 72 | + |
64 | 73 | [[glossary-index]] index :: |
65 | 74 |
|
66 | 75 | An index is like a _table_ in a relational database. It has a |
|
105 | 114 | + |
106 | 115 | See also <<glossary-routing,routing>> |
107 | 116 |
|
| 117 | +[[glossary-query]] query :: |
| 118 | + |
| 119 | + A query is the basic component of a search. A search can be defined by one or more queries |
| 120 | + which can be mixed and matched in endless combinations. While <<glossary-filter,filters>> are |
| 121 | + queries that only determine if a document matches, those queries that also calculate how well |
| 122 | + the document matches are known as "scoring queries". Those queries assign it a score, which is |
| 123 | + later used to sort matched documents. Scoring queries take more resources than <<glossary-filter,non scoring queries>> |
| 124 | + and their query results are not cacheable. As a general rule, use query clauses for full-text |
| 125 | + search or for any condition that requires scoring, and use filters for everything else. |
| 126 | + |
108 | 127 | [[glossary-replica-shard]] replica shard :: |
109 | 128 |
|
110 | 129 | Each <<glossary-primary-shard,primary shard>> can have zero or more |
|
161 | 180 |
|
162 | 181 | A term is an exact value that is indexed in Elasticsearch. The terms |
163 | 182 | `foo`, `Foo`, `FOO` are NOT equivalent. Terms (i.e. exact values) can |
164 | | - be searched for using _term_ queries. + |
165 | | - See also <<glossary-text,text>> and <<glossary-analysis,analysis>>. |
| 183 | + be searched for using _term_ queries. |
| 184 | + + |
| 185 | + See also <<glossary-text,text>> and <<glossary-analysis,analysis>>. |
166 | 186 |
|
167 | 187 | [[glossary-text]] text :: |
168 | 188 |
|
|
0 commit comments