Completed
Pull Request — develop (#25)
by Sam
03:27 queued 34s
created

AbstractQuery::setField()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php namespace Nord\Lumen\Elasticsearch\Search\Query\TermLevel;
2
3
use Nord\Lumen\Elasticsearch\Search\Query\QueryDSL;
4
use Nord\Lumen\Elasticsearch\Search\Query\Traits\HasField;
5
6
/**
7
 * While the full text queries will analyze the query string before executing, the term-level queries operate on the
8
 * exact terms that are stored in the inverted index.
9
 *
10
 * These queries are usually used for structured data like numbers, dates, and enums, rather than full text fields.
11
 * Alternatively, they allow you to craft low-level queries, foregoing the analysis process.
12
 *
13
 * The queries in this group are:
14
 *
15
 * - "term" query
16
 * Find documents which contain the exact term specified in the field specified.
17
 *
18
 * - "terms" query
19
 * Find documents which contain any of the exact terms specified in the field specified.
20
 *
21
 * - "range" query
22
 * Find documents where the field specified contains values (dates, numbers, or strings) in the range specified.
23
 *
24
 * - "exists" query
25
 * Find documents where the field specified contains any non-null value.
26
 *
27
 * - "missing" query
28
 * Find documents where the field specified does is missing or contains only null values.
29
 *
30
 * - "prefix" query
31
 * Find documents where the field specified contains terms which being with the exact prefix specified.
32
 *
33
 * - "wildcard" query
34
 * Find documents where the field specified contains terms which match the pattern specified, where the pattern supports
35
 * single character wildcards (?) and multi-character wildcards (*)
36
 *
37
 * - "regexp" query
38
 * Find documents where the field specified contains terms which match the regular expression specified.
39
 *
40
 * - "fuzzy" query
41
 * Find documents where the field specified contains terms which are fuzzily similar to the specified term.
42
 * Fuzziness is measured as a Levenshtein edit distance of 1 or 2.
43
 *
44
 * - "type" query
45
 * Find documents of the specified type.
46
 *
47
 * - "ids" query
48
 * Find documents with the specified type and IDs.
49
 *
50
 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/term-level-queries.html
51
 */
52
abstract class AbstractQuery extends QueryDSL
53
{
54
    use HasField;
55
}
56