elastic-enterprise-search 7.11.0 → 7.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/functions/imports.sh +2 -3
  3. data/.ci/jobs/elastic+enterprise-search-ruby+7.11.yml +12 -0
  4. data/.ci/run-elasticsearch.sh +3 -3
  5. data/.ci/run-enterprise-search.sh +1 -0
  6. data/.ci/run-local.sh +1 -1
  7. data/.ci/run-tests +7 -9
  8. data/.ci/test-matrix.yml +1 -1
  9. data/docs/guide/app-search-api.asciidoc +15 -1
  10. data/docs/guide/index.asciidoc +2 -0
  11. data/docs/guide/release_notes/710.asciidoc +4 -0
  12. data/docs/guide/release_notes/711.asciidoc +27 -0
  13. data/docs/guide/release_notes/712.asciidoc +26 -0
  14. data/docs/guide/release_notes/index.asciidoc +14 -0
  15. data/docs/guide/workplace-search-api.asciidoc +1 -1
  16. data/elastic-enterprise-search.gemspec +3 -2
  17. data/lib/elastic/app-search/api/api_logs.rb +2 -2
  18. data/lib/elastic/app-search/api/list_curations.rb +2 -2
  19. data/lib/elastic/app-search/api/list_documents.rb +2 -2
  20. data/lib/elastic/app-search/api/list_engines.rb +2 -2
  21. data/lib/elastic/app-search/api/list_synonym_sets.rb +2 -2
  22. data/lib/elastic/app-search/api/multi_search.rb +4 -4
  23. data/lib/elastic/app-search/api/search.rb +1 -1
  24. data/lib/elastic/app-search/api/top_clicks_analytics.rb +2 -2
  25. data/lib/elastic/app-search/api/top_queries_analytics.rb +2 -2
  26. data/lib/elastic/enterprise-search/version.rb +1 -1
  27. data/lib/elastic/workplace-search/api/create_analytics_event.rb +1 -1
  28. data/lib/elastic/workplace-search/api/delete_documents.rb +3 -3
  29. data/lib/elastic/workplace-search/api/search.rb +1 -1
  30. data/spec/app-search/api_search_and_multi_search_spec.rb +1 -1
  31. data/spec/app-search/date_spec.rb +69 -0
  32. data/spec/workplace-search/documents_spec.rb +1 -1
  33. metadata +11 -5
  34. data/.ci/jobs/elastic+enterprise-search-ruby+7.10.0.beta.1.yml +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4088e21d195caeed0c05e7374d8317903d1784a71e1e21de3e7d11f0fea30b32
4
- data.tar.gz: c6cc664ab8b1a388b49809aafeb1e5395284e33912b0864a591bd354e72dc3f0
3
+ metadata.gz: 304ea65c57225137d2e1b45f38d49bbc71a7a19ffaf0b4fe13313cbf6bd790f6
4
+ data.tar.gz: b470d629aa5d13e83af77ca0ff7ccfe1555baba0bb31fcaa4e621896aea5738c
5
5
  SHA512:
6
- metadata.gz: 8e471a1602e19cf80d8b28014d2266405cc17fb19dc1d11c5a0a290cc06199cfd9c0407f6fd946e9e28afeb83d8d48cbb2b4eb82e6e9d43942b49b8ddbaf3285
7
- data.tar.gz: c36ecb6be8ec8d91e6827715f166119532c7e61887a300941506b79be0d1a3f666f2f8374155d671650ca97359883b1bd6af9dab47fe520f3d30294c9e62c642
6
+ metadata.gz: a6621e4b977abb889c81bb6ecb6ed10857cc03ea2dc6db26325145f936d3d0effd55f941518a03cdeae3a7f70c7223e63e537412b241097b7b68917f1f26f49f
7
+ data.tar.gz: 6ba8192ac2a50e08bbfbbaafad916f42c8102bb34145aa291fa914f4d5ebaa47f42386e5190000e4b013f4f21ef5d1363b23262ae1c737a2bcc65007aafc5abe
@@ -18,7 +18,7 @@ require_stack_version
18
18
  if [[ -z $es_node_name ]]; then
19
19
  # only set these once
20
20
  set -euo pipefail
21
- export TEST_SUITE=${TEST_SUITE-oss}
21
+ export TEST_SUITE=${TEST_SUITE-free}
22
22
  export RUNSCRIPTS=${RUNSCRIPTS-}
23
23
  export DETACH=${DETACH-false}
24
24
  export CLEANUP=${CLEANUP-false}
@@ -27,8 +27,7 @@ if [[ -z $es_node_name ]]; then
27
27
  export elastic_password=changeme
28
28
  export elasticsearch_image=elasticsearch
29
29
  export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
30
- if [[ $TEST_SUITE != "xpack" ]]; then
31
- export elasticsearch_image=elasticsearch-${TEST_SUITE}
30
+ if [[ $TEST_SUITE != "platinum" ]]; then
32
31
  export elasticsearch_url=http://${es_node_name}:9200
33
32
  fi
34
33
  export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}
@@ -0,0 +1,12 @@
1
+ ---
2
+ - job:
3
+ name: elastic+enterprise-search-ruby+7.11
4
+ display-name: 'elastic / enterprise-search-ruby # 7.11'
5
+ description: Testing the enterprise-search-ruby 7.11 branch.
6
+ junit_results: "*-junit.xml"
7
+ parameters:
8
+ - string:
9
+ name: branch_specifier
10
+ default: refs/heads/7.11
11
+ description: the Git branch specifier to build (<branchName>, <tagName>,
12
+ <commitId>, etc.)
@@ -4,7 +4,7 @@
4
4
  # to form a cluster suitable for running the REST API tests.
5
5
  #
6
6
  # Export the STACK_VERSION variable, eg. '8.0.0-SNAPSHOT'.
7
- # Export the TEST_SUITE variable, eg. 'oss' or 'xpack' defaults to 'oss'.
7
+ # Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
8
8
  # Export the NUMBER_OF_NODES variable to start more than 1 node
9
9
 
10
10
  # Version 1.2.0
@@ -39,7 +39,7 @@ environment=($(cat <<-END
39
39
  --env repositories.url.allowed_urls=http://snapshot.test*
40
40
  END
41
41
  ))
42
- if [[ "$TEST_SUITE" == "xpack" ]]; then
42
+ if [[ "$TEST_SUITE" == "platinum" ]]; then
43
43
  environment+=($(cat <<-END
44
44
  --env ELASTIC_PASSWORD=$elastic_password
45
45
  --env xpack.license.self_generated.type=trial
@@ -64,7 +64,7 @@ END
64
64
  fi
65
65
 
66
66
  cert_validation_flags=""
67
- if [[ "$TEST_SUITE" == "xpack" ]]; then
67
+ if [[ "$TEST_SUITE" == "platinum" ]]; then
68
68
  cert_validation_flags="--insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name}:443:127.0.0.1"
69
69
  fi
70
70
 
@@ -13,6 +13,7 @@ script_path=$(dirname $(realpath -s $0))
13
13
  source $script_path/functions/imports.sh
14
14
  set -euo pipefail
15
15
 
16
+ CONTAINER_NAME=${CONTAINER_NAME-enterprise-search}
16
17
  APP_SEARCH_SECRET_SESSION_KEY=${APP_SEARCH_SECRET_SESSION_KEY-int_test_secret}
17
18
 
18
19
  echo -e "\033[34;1mINFO:\033[0m Take down node if called twice with the same arguments (DETACH=true) or on seperate terminals \033[0m"
data/.ci/run-local.sh CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  #
3
- export TEST_SUITE=xpack
3
+ export TEST_SUITE=platinum
4
4
  export CONTAINER_NAME=enterprise-search
5
5
 
6
6
  script_path=$(dirname $(realpath -s $0))
data/.ci/run-tests CHANGED
@@ -3,9 +3,7 @@
3
3
  # Version 1.1
4
4
  # - Moved to .ci folder and seperated out `run-repository.sh`
5
5
  # - Add `$RUNSCRIPTS` env var for running Elasticsearch dependent products
6
-
7
- # Enterprise Search requires a licensed Elasticsearch instance
8
- export TEST_SUITE=xpack
6
+ export TEST_SUITE=platinum
9
7
  export CONTAINER_NAME=enterprise-search
10
8
  export RUNSCRIPTS=enterprise-search
11
9
 
@@ -17,12 +15,12 @@ echo -e "\033[1m>>>>> Start [$STACK_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>
17
15
  DETACH=true bash .ci/run-elasticsearch.sh
18
16
 
19
17
  if [[ -n "$RUNSCRIPTS" ]]; then
20
- for RUNSCRIPT in ${RUNSCRIPTS//,/ } ; do
21
- echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
22
- CONTAINER_NAME=${RUNSCRIPT} \
23
- DETACH=true \
24
- bash .ci/run-${RUNSCRIPT}.sh
25
- done
18
+ for RUNSCRIPT in ${RUNSCRIPTS//,/ } ; do
19
+ echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
20
+ CONTAINER_NAME=${RUNSCRIPT} \
21
+ DETACH=true \
22
+ bash .ci/run-${RUNSCRIPT}.sh
23
+ done
26
24
  fi
27
25
 
28
26
  echo -e "\033[1m>>>>> Repository specific tests >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
data/.ci/test-matrix.yml CHANGED
@@ -9,6 +9,6 @@ STACK_VERSION:
9
9
  - 7.x-SNAPSHOT
10
10
 
11
11
  TEST_SUITE:
12
- - xpack
12
+ - platinum
13
13
 
14
14
  exclude: ~
@@ -75,10 +75,24 @@ query = {
75
75
 
76
76
  client.search(engine_name, query)
77
77
 
78
+ # Search with multiple filters
79
+ client.search('parks', {
80
+ body: {
81
+ query: "olympic",
82
+ filters: {
83
+ all: [
84
+ { states: "Washington" },
85
+ { world_heritage_site: "true" }
86
+ ]
87
+ }
88
+ }
89
+ })
90
+
78
91
  # Multi query search
79
92
  queries = [{ query: 'Nicanor'}, { query: 'Iain' }]
80
93
 
81
- client.multi_search(engine_name, queries: queries)
94
+ client.multi_search(engine_name, body: queries)
95
+
82
96
  ----------------------------
83
97
 
84
98
  === Synonym Sets
@@ -15,3 +15,5 @@ include::enterprise-search-api.asciidoc[]
15
15
  include::app-search-api.asciidoc[]
16
16
 
17
17
  include::workplace-search-api.asciidoc[]
18
+
19
+ include::release_notes/index.asciidoc[]
@@ -0,0 +1,4 @@
1
+ [[release_notes_710]]
2
+ === 7.10.0.beta.1 Release notes
3
+
4
+ First beta release. It supports the 7.10.0 API for Elastic Enterprise Search, App Search and Workplace Search.
@@ -0,0 +1,27 @@
1
+ [[release_notes_711]]
2
+ === 7.11.0 Release notes
3
+
4
+ First General Availability Release
5
+
6
+ [discrete]
7
+ ==== General
8
+
9
+ - All App Search, Workplace Search and Enterprise Search API endpoints have been implemented updated to the 7.11 specification, and have been tested and documented.
10
+ - Docs were moved from the README file to asciidocs.
11
+ - Some endpoints both in App Search and Workplace Search have changed to have named parameters for `body` when it makes sense.
12
+ - Support for per request custom HTTP headers was added. See docs.
13
+ - Support for per request http authentication was added when using OAuth. See docs.
14
+ - Tested with Ruby 3.
15
+ - Sends the `X-Elastic-Client-Meta` HTTP header which is used by Elastic Cloud and can be disabled with the `enable_meta_header` parameter.
16
+
17
+ [discrete]
18
+ ==== App Search
19
+
20
+ - Added support for signed search key in App Search.
21
+
22
+ [discrete]
23
+ ==== Workplace Search
24
+
25
+ - `content_source_key` was deprecated in favour of `content_source_id`.
26
+ - Added support for OAuth.
27
+ - With OAuth support, `search` and `create_analytics` APIs are now also available.
@@ -0,0 +1,26 @@
1
+ [[release_notes_712]]
2
+ === 7.12.0 Release notes
3
+
4
+ [discrete]
5
+ ==== General
6
+
7
+ - Tested with Elastic Enterprise Search API version 7.12.0.
8
+ - https://www.elastic.co/guide/en/enterprise-search-clients/ruby/7.12/app-search-api.html#_search[Adds multi filter example to App Search docs].
9
+ - Bumps `elasticsearch-transport` dependency to version 7.11 and up.
10
+ - Updates `run-local` script to fix rake `stack` task.
11
+
12
+ [discrete]
13
+ ==== App Search
14
+
15
+ - Updates source code documentation for `current_page` and `page_size` parameters from type `String` to `Integer`.
16
+ - In `multi_search`, the body parameter is renamed to `body` from `queries` to avoid repetition and potential confusion.
17
+
18
+ [discrete]
19
+ ==== Workplace Search
20
+
21
+ - Body parameter renamed to `document_ids` in `delete_documents`:
22
+
23
+ [source,rb]
24
+ ----------------------------
25
+ client.delete_documents(content_source_id, document_ids: ['e68fbc2688f1', 'c535e226aee3'])
26
+ ----------------------------
@@ -0,0 +1,14 @@
1
+ [[release_notes]]
2
+ == Release Notes
3
+
4
+
5
+ [discrete]
6
+ === 7.x
7
+
8
+ * <<release_notes_712, 7.12.0 Release Notes>>
9
+ * <<release_notes_711, 7.11.0 Release Notes>>
10
+ * <<release_notes_710, 7.10.0.beta.1 Release Notes>>
11
+
12
+ include::712.asciidoc[]
13
+ include::711.asciidoc[]
14
+ include::710.asciidoc[]
@@ -16,7 +16,7 @@ documents = [
16
16
  response = client.index_documents(content_source_id, body: documents)
17
17
 
18
18
  # Delete Documents
19
- response = client.delete_documents(content_source_id, body: ['e68fbc2688f1', 'c535e226aee3'])
19
+ response = client.delete_documents(content_source_id, document_ids: ['e68fbc2688f1', 'c535e226aee3'])
20
20
  ----------------------------
21
21
 
22
22
  === OAuth Authentication
@@ -38,7 +38,8 @@ Gem::Specification.new do |s|
38
38
  'bug_tracker_uri' => 'https://github.com/elastic/enterprise-search-ruby/issues',
39
39
  'documentation_uri' => 'https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current/index.html',
40
40
  'homepage_uri' => 'https://www.elastic.co/enterprise-search',
41
- 'source_code_uri' => 'https://github.com/elastic/enterprise-search-ruby'
41
+ 'source_code_uri' => 'https://github.com/elastic/enterprise-search-ruby',
42
+ 'changelog_uri' => 'https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current/release_notes.html'
42
43
  }
43
44
 
44
45
  s.files = `git ls-files`.split("\n")
@@ -46,7 +47,7 @@ Gem::Specification.new do |s|
46
47
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
47
48
  s.require_paths = ['lib']
48
49
 
49
- s.add_dependency 'elasticsearch-transport', '~> 7.11'
50
+ s.add_dependency 'elasticsearch-transport', '>= 7.11'
50
51
  s.add_runtime_dependency 'jwt', '>= 1.5', '< 3.0'
51
52
  s.add_development_dependency 'awesome_print'
52
53
  s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION)
@@ -27,8 +27,8 @@ module Elastic
27
27
  # @param arguments [Hash] endpoint arguments
28
28
  # @option arguments [String] :from_date Filter date from (*Required*)
29
29
  # @option arguments [String] :to_date Filter date to (*Required*)
30
- # @option arguments [String] :current_page The page to fetch. Defaults to 1
31
- # @option arguments [String] :page_size The number of results per page
30
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
31
+ # @option arguments [Integer] :page_size The number of results per page
32
32
  # @option arguments [String] :query Use this to specify a particular endpoint, like analytics, search, curations and so on
33
33
  # @option arguments [String] :http_status_filter Filter based on a particular status code: 400, 401, 403, 429, 200
34
34
  # @option arguments [String] :http_method_filter Filter based on a particular HTTP method: GET, POST, PUT, PATCH, DELETE
@@ -25,8 +25,8 @@ module Elastic
25
25
  #
26
26
  # @param engine_name [String] (*Required*)
27
27
  # @param arguments [Hash] endpoint arguments
28
- # @option arguments [String] :current_page The page to fetch. Defaults to 1
29
- # @option arguments [String] :page_size The number of results per page
28
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
29
+ # @option arguments [Integer] :page_size The number of results per page
30
30
  # @option arguments [Hash] :body The request body
31
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
32
32
  #
@@ -25,8 +25,8 @@ module Elastic
25
25
  #
26
26
  # @param engine_name [String] (*Required*)
27
27
  # @param arguments [Hash] endpoint arguments
28
- # @option arguments [String] :current_page The page to fetch. Defaults to 1
29
- # @option arguments [String] :page_size The number of results per page
28
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
29
+ # @option arguments [Integer] :page_size The number of results per page
30
30
  # @option arguments [Hash] :body The request body
31
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
32
32
  #
@@ -24,8 +24,8 @@ module Elastic
24
24
  # Engine - Retrieves all engines with optional pagination support
25
25
  #
26
26
  # @param arguments [Hash] endpoint arguments
27
- # @option arguments [String] :current_page The page to fetch. Defaults to 1
28
- # @option arguments [String] :page_size The number of results per page
27
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
28
+ # @option arguments [Integer] :page_size The number of results per page
29
29
  # @option arguments [Hash] :body The request body
30
30
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
31
31
  #
@@ -25,8 +25,8 @@ module Elastic
25
25
  #
26
26
  # @param engine_name [String] (*Required*)
27
27
  # @param arguments [Hash] endpoint arguments
28
- # @option arguments [String] :current_page The page to fetch. Defaults to 1
29
- # @option arguments [String] :page_size The number of results per page
28
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
29
+ # @option arguments [Integer] :page_size The number of results per page
30
30
  # @option arguments [Hash] :body The request body
31
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
32
32
  #
@@ -25,23 +25,23 @@ module Elastic
25
25
  #
26
26
  # @param engine_name [String] (*Required*)
27
27
  # @param arguments [Hash] endpoint arguments
28
- # @option arguments [Object] :queries One or more queries to execute in parallel (*Required*)
28
+ # @option arguments [Object] :body One or more queries to execute in parallel (*Required*)
29
29
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
30
30
  #
31
31
  # @see https://www.elastic.co/guide/en/app-search/current/multi-search.html
32
32
  #
33
33
  def multi_search(engine_name, arguments = {})
34
34
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
35
- raise ArgumentError, "Required parameter 'queries' missing" unless arguments[:queries]
35
+ raise ArgumentError, "Required parameter 'body' missing" unless arguments[:body]
36
36
 
37
- queries = arguments.delete(:queries) || {}
37
+ body = arguments.delete(:body) || {}
38
38
  headers = arguments.delete(:headers) || {}
39
39
 
40
40
  request(
41
41
  :post,
42
42
  "api/as/v1/engines/#{engine_name}/multi_search/",
43
43
  arguments,
44
- queries,
44
+ body,
45
45
  headers
46
46
  )
47
47
  end
@@ -28,7 +28,7 @@ module Elastic
28
28
  # @option arguments [Object] :body Search request parameters
29
29
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
30
30
  #
31
- # @see https://www.elastic.co/guide/en/app-search/current/search.html#search-single
31
+ # @see https://www.elastic.co/guide/en/app-search/current/search.html
32
32
  #
33
33
  def search(engine_name, arguments = {})
34
34
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
@@ -26,8 +26,8 @@ module Elastic
26
26
  # @param engine_name [String] (*Required*)
27
27
  # @param arguments [Hash] endpoint arguments
28
28
  # @option arguments [String] :query Filter clicks over a search query
29
- # @option arguments [String] :current_page The page to fetch. Defaults to 1
30
- # @option arguments [String] :page_size The number of results per page
29
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
30
+ # @option arguments [Integer] :page_size The number of results per page
31
31
  # @option arguments [Array] :filters Analytics filters
32
32
  # @option arguments [Hash] :body The request body
33
33
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
@@ -25,8 +25,8 @@ module Elastic
25
25
  #
26
26
  # @param engine_name [String] (*Required*)
27
27
  # @param arguments [Hash] endpoint arguments
28
- # @option arguments [String] :current_page The page to fetch. Defaults to 1
29
- # @option arguments [String] :page_size The number of results per page
28
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
29
+ # @option arguments [Integer] :page_size The number of results per page
30
30
  # @option arguments [Array] :filters Analytics filters
31
31
  # @option arguments [Hash] :body The request body
32
32
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Elastic
21
21
  module EnterpriseSearch
22
- VERSION = '7.11.0'
22
+ VERSION = '7.12.0'
23
23
  end
24
24
  end
@@ -21,7 +21,7 @@ module Elastic
21
21
  module EnterpriseSearch
22
22
  module WorkplaceSearch
23
23
  module Actions
24
- # Analytics - capture click and feedback analytic events
24
+ # Analytics - Capture click and feedback analytic events
25
25
  # Capture Analytic Events
26
26
  #
27
27
  # @param arguments [Hash] endpoint arguments
@@ -26,7 +26,7 @@ module Elastic
26
26
  #
27
27
  # @param content_source_id [String] Unique ID for a Custom API source, provided upon creation of a Custom API Source (*Required*)
28
28
  # @param arguments [Hash] endpoint arguments
29
- # @option arguments [Array] :body
29
+ # @option arguments [Array] :document_ids
30
30
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
31
31
  #
32
32
  # @see https://www.elastic.co/guide/en/workplace-search/current/workplace-search-custom-sources-api.html#destroy
@@ -34,14 +34,14 @@ module Elastic
34
34
  def delete_documents(content_source_id, arguments = {})
35
35
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
36
36
 
37
- body = arguments.delete(:body) || {}
37
+ document_ids = arguments.delete(:document_ids) || {}
38
38
  headers = arguments.delete(:headers) || {}
39
39
 
40
40
  request(
41
41
  :post,
42
42
  "api/ws/v1/sources/#{content_source_id}/documents/bulk_destroy/",
43
43
  arguments,
44
- body,
44
+ document_ids,
45
45
  headers
46
46
  )
47
47
  end
@@ -21,7 +21,7 @@ module Elastic
21
21
  module EnterpriseSearch
22
22
  module WorkplaceSearch
23
23
  module Actions
24
- # Search - search across available sources with various query tuning options
24
+ # Search - Search across available sources with various query tuning options
25
25
  # Issue a Search Query
26
26
  #
27
27
  # @param arguments [Hash] endpoint arguments
@@ -36,7 +36,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
36
36
  context 'multi query search' do
37
37
  it 'performs a multi query search' do
38
38
  VCR.use_cassette('app_search/multi_query_search') do
39
- response = @client.multi_search('books', queries: [{ query: 'Herman' }, { query: 'Edgar' }])
39
+ response = @client.multi_search('books', body: [{ query: 'Herman' }, { query: 'Edgar' }])
40
40
  expect(response.status).to eq 200
41
41
  expect(response.body.class).to be Array
42
42
  expect(response.body.count).to be 2
@@ -0,0 +1,69 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ # frozen_string_literal: true
19
+
20
+ require 'spec_helper'
21
+
22
+ describe Elastic::EnterpriseSearch::AppSearch::Client do
23
+ let(:host) { 'https://localhost:8080' }
24
+ let(:api_key) { 'api_key' }
25
+ let(:client) { Elastic::EnterpriseSearch::AppSearch::Client.new(host: host) }
26
+ let(:subject) { client.date_to_rfc3339(date) }
27
+
28
+ context 'Date (year=2020, month=1, day=2)' do
29
+ let(:date) { Date.new(2020, 1, 2) }
30
+ it 'serializes' do
31
+ expect(subject).to eq('2020-01-02T00:00:00+00:00')
32
+ end
33
+ end
34
+
35
+ context 'Date (year=1995, month=12, day=29)' do
36
+ let(:date) { Date.new(1995, 12, 29) }
37
+ it 'serializes' do
38
+ expect(subject).to eq('1995-12-29T00:00:00+00:00')
39
+ end
40
+ end
41
+
42
+ context 'Date (year=2020, month=1, day=2, hour=3, minute=4, second=5)' do
43
+ let(:date) { DateTime.new(2020, 1, 2, 3, 4, 5, '+00:00') }
44
+ it 'serializes' do
45
+ expect(subject).to eq('2020-01-02T03:04:05+00:00')
46
+ end
47
+ end
48
+
49
+ context 'Date (year=1995, month=12, day=29, hour=23, minute=44, second=55)' do
50
+ let(:date) { DateTime.new(1995, 12, 29, 23, 44, 55, '-05:00') }
51
+ it 'serializes' do
52
+ expect(subject).to eq('1995-12-29T23:44:55-05:00')
53
+ end
54
+ end
55
+
56
+ context 'Date (year=1995, month=12, day=29, hour=23, minute=44, second=55) with Asia/Kolkata (UTC+5:30) Timezone' do
57
+ let(:date) { DateTime.new(1995, 12, 29, 23, 44, 55, '+5:30') }
58
+ it 'serializes' do
59
+ expect(subject).to eq('1995-12-29T23:44:55+05:30')
60
+ end
61
+ end
62
+
63
+ context 'Date (year=1995, month=12, day=29, hour=23, minute=44, second=55) with HST (UTC-10:00) Timezone' do
64
+ let(:date) { DateTime.new(2020, 1, 2, 3, 4, 5, '-10:00') }
65
+ it 'serializes' do
66
+ expect(subject).to eq('2020-01-02T03:04:05-10:00')
67
+ end
68
+ end
69
+ end
@@ -64,7 +64,7 @@ describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
64
64
 
65
65
  it 'deletes' do
66
66
  VCR.use_cassette('workplace_search/delete_documents') do
67
- response = client.delete_documents(content_source_id, body: documents.map { |doc| doc['id'] })
67
+ response = client.delete_documents(content_source_id, document_ids: documents.map { |doc| doc['id'] })
68
68
  expect(response.status).to eq 200
69
69
  expect(response.body)
70
70
  .to eq(
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-enterprise-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.11.0
4
+ version: 7.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Briano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-10 00:00:00.000000000 Z
11
+ date: 2021-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elasticsearch-transport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '7.11'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '7.11'
27
27
  - !ruby/object:Gem::Dependency
@@ -164,7 +164,7 @@ files:
164
164
  - ".ci/functions/imports.sh"
165
165
  - ".ci/functions/wait-for-container.sh"
166
166
  - ".ci/jobs/defaults.yml"
167
- - ".ci/jobs/elastic+enterprise-search-ruby+7.10.0.beta.1.yml"
167
+ - ".ci/jobs/elastic+enterprise-search-ruby+7.11.yml"
168
168
  - ".ci/jobs/elastic+enterprise-search-ruby+master.yml"
169
169
  - ".ci/jobs/elastic+enterprise-search-ruby+pull-request.yml"
170
170
  - ".ci/run-elasticsearch.sh"
@@ -189,6 +189,10 @@ files:
189
189
  - docs/guide/index.asciidoc
190
190
  - docs/guide/installation.asciidoc
191
191
  - docs/guide/overview.asciidoc
192
+ - docs/guide/release_notes/710.asciidoc
193
+ - docs/guide/release_notes/711.asciidoc
194
+ - docs/guide/release_notes/712.asciidoc
195
+ - docs/guide/release_notes/index.asciidoc
192
196
  - docs/guide/workplace-search-api.asciidoc
193
197
  - elastic-enterprise-search.gemspec
194
198
  - lib/data/ca-bundle.crt
@@ -272,6 +276,7 @@ files:
272
276
  - spec/app-search/api_top_clicks_analytics_spec.rb
273
277
  - spec/app-search/api_top_queries_analytics_spec.rb
274
278
  - spec/app-search/client_spec.rb
279
+ - spec/app-search/date_spec.rb
275
280
  - spec/enterprise-search/client_spec.rb
276
281
  - spec/enterprise-search/request_spec.rb
277
282
  - spec/enterprise-search/utils_spec.rb
@@ -345,6 +350,7 @@ metadata:
345
350
  documentation_uri: https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current/index.html
346
351
  homepage_uri: https://www.elastic.co/enterprise-search
347
352
  source_code_uri: https://github.com/elastic/enterprise-search-ruby
353
+ changelog_uri: https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current/release_notes.html
348
354
  post_install_message:
349
355
  rdoc_options: []
350
356
  require_paths:
@@ -1,12 +0,0 @@
1
- ---
2
- - job:
3
- name: elastic+enterprise-search-ruby+7.10.0.beta.1
4
- display-name: 'elastic / enterprise-search-ruby # 7.10.0.beta.1'
5
- description: Testing the enterprise-search-ruby 7.10.0.beta.1 branch.
6
- junit_results: "*-junit.xml"
7
- parameters:
8
- - string:
9
- name: branch_specifier
10
- default: refs/heads/7.10.0.beta.1
11
- description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
12
- &lt;commitId&gt;, etc.)