Module: Eson::Shared::Search

Extended by:
API
Defined in:
lib/eson/shared/core/search.rb

Overview

Requests using this API have the following properties:

The request supports the following parameters: timeout, types, routing, query, from, size, search_type, sort, track_scores, highlight, fields, script_fields, preference, facets, filter, scroll, indices_boost, explain, version, min_score, q, df, analyzer, lowercase_expanded_terms The request declares the following parameters as source parameters: query, timeout, from, size, sort, track_scores, highlight, fields, script_fields, facets, filter, indices_boost, explain, version, min_score The request can operate on multiple indices. The request can operate on multiple types.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from API

no_indices

Methods included from Chainable

#chainable, #extendable

Instance Attribute Details

#typeObject

Returns the value of attribute type.



12
13
14
# File 'lib/eson/shared/core/search.rb', line 12

def type
  @type
end

Instance Method Details

#multi_indextrue

The request can operate on multiple indices.

Returns:

  • (true)


15
# File 'lib/eson/shared/core/search.rb', line 15

multi_index true

#multi_typestrue

The request can operate on multiple types.

Returns:

  • (true)


18
# File 'lib/eson/shared/core/search.rb', line 18

multi_types true

#parametersArray<String>

The request supports the following parameters: timeout, types, routing, query, from, size, search_type, sort, track_scores, highlight, fields, script_fields, preference, facets, filter, scroll, indices_boost, explain, version, min_score, q, df, analyzer, lowercase_expanded_terms

Returns:

  • (Array<String>)

    The parameters



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/eson/shared/core/search.rb', line 38

parameters :timeout,
:types,
:routing,
:query,
:from,
:size,
:search_type,
:sort,
:track_scores,
:highlight,
:fields,
:script_fields,
:preference,
:facets,
:filter,
:scroll,
:indices_boost,
:explain,
:version,
:min_score,
:q,
:df,
:analyzer,
:lowercase_expanded_terms

#source_paramArray<String>

The request declares the following parameters as source parameters: query, timeout, from, size, sort, track_scores, highlight, fields, script_fields, facets, filter, indices_boost, explain, version, min_score

Returns:

  • (Array<String>)

    The source parameters



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/eson/shared/core/search.rb', line 21

source_param :query,
:timeout,
:from,
:size,
:sort,
:track_scores,
:highlight,
:fields,
:script_fields,
:facets,
:filter,
:indices_boost,
:explain,
:version,
:min_score

#typesObject



63
64
65
66
67
68
69
70
71
# File 'lib/eson/shared/core/search.rb', line 63

def types
  if @types
    Array(@types)
  elsif type
    Array(type)
  else
    []
  end
end