connectors_utility 8.4.0.0 → 8.4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 824ceaf9dec38db287b8ec5739847b5dc08b3c1ea140bce575076bceb8b6caf6
4
- data.tar.gz: b287e744ebe57f49162437744649e0e2d304c3e0a2ecfbb1bdeb082e0463f9f8
3
+ metadata.gz: e33f6b71650c6bf509ad4dec8065a97dae7b48e01feb442a163c63aa55acbeee
4
+ data.tar.gz: 6813830e1050d3c3361936976860ea08418c4d2ad7ae6764640096f83fb4572c
5
5
  SHA512:
6
- metadata.gz: 856965cb7aca1080b86e241e688495c18228dd75d9ee1dc895aed16b3ab86f5a8694c6715bd0e88699803665590c3d4c18d302e3b593ee4fba4a85ccc921c778
7
- data.tar.gz: 32398b3b4c4771665dcddd9f493f7ca1155757828cfcb9ddb52ca9f2f2e8eca09d4f8f1a84d6aee108d9af18da2dc5dd2eb1829009bc1bce1896a87b28fb7474
6
+ metadata.gz: 73ac602ac9da3526e9104ee52c91b417a965c3e7ee1e8bd937695742ea0e5b8dd09fc72e56ae019c8b1ced48b1a72a26e2d1252e7fc2c99d35e495df6e5144b9
7
+ data.tar.gz: b97eef3df6c98684477ecd6d709504602e32add75f32e1df0c0c04f83d034631dde36458cd78d1c506d71309f4df0ab0eb7ac5411d16ae79800eb3652bd87d3e
@@ -12,63 +12,89 @@ module Utility
12
12
  module Mappings
13
13
  ENUM_IGNORE_ABOVE = 2048
14
14
 
15
- WORKPLACE_SEARCH_SUBEXTRACTION_STAMP_FIELD_MAPPINGS = {
16
- _subextracted_as_of: {
17
- type: 'date'
18
- },
19
- _subextracted_version: {
20
- type: 'keyword'
15
+ DATE_FIELD_MAPPING = {
16
+ type: 'date'
17
+ }
18
+
19
+ KEYWORD_FIELD_MAPPING = {
20
+ type: 'keyword'
21
+ }
22
+
23
+ TEXT_FIELD_MAPPING = {
24
+ type: 'text',
25
+ analyzer: 'iq_text_base',
26
+ index_options: 'freqs',
27
+ fields: {
28
+ 'stem': {
29
+ type: 'text',
30
+ analyzer: 'iq_text_stem'
31
+ },
32
+ 'prefix' => {
33
+ type: 'text',
34
+ analyzer: 'i_prefix',
35
+ search_analyzer: 'q_prefix',
36
+ index_options: 'docs'
37
+ },
38
+ 'delimiter' => {
39
+ type: 'text',
40
+ analyzer: 'iq_text_delimiter',
41
+ index_options: 'freqs'
42
+ },
43
+ 'joined': {
44
+ type: 'text',
45
+ analyzer: 'i_text_bigram',
46
+ search_analyzer: 'q_text_bigram',
47
+ index_options: 'freqs'
48
+ },
49
+ 'enum': {
50
+ type: 'keyword',
51
+ ignore_above: ENUM_IGNORE_ABOVE
52
+ }
21
53
  }
54
+ }
55
+
56
+ WORKPLACE_SEARCH_SUBEXTRACTION_STAMP_FIELD_MAPPINGS = {
57
+ _subextracted_as_of: DATE_FIELD_MAPPING,
58
+ _subextracted_version: KEYWORD_FIELD_MAPPING
59
+ }.freeze
60
+
61
+ CRAWLER_FIELD_MAPPINGS = {
62
+ additional_urls: KEYWORD_FIELD_MAPPING,
63
+ body_content: TEXT_FIELD_MAPPING,
64
+ domains: KEYWORD_FIELD_MAPPING,
65
+ headings: TEXT_FIELD_MAPPING,
66
+ last_crawled_at: DATE_FIELD_MAPPING,
67
+ links: KEYWORD_FIELD_MAPPING,
68
+ meta_description: TEXT_FIELD_MAPPING,
69
+ meta_keywords: KEYWORD_FIELD_MAPPING,
70
+ title: TEXT_FIELD_MAPPING,
71
+ url: KEYWORD_FIELD_MAPPING,
72
+ url_host: KEYWORD_FIELD_MAPPING,
73
+ url_path: KEYWORD_FIELD_MAPPING,
74
+ url_path_dir1: KEYWORD_FIELD_MAPPING,
75
+ url_path_dir2: KEYWORD_FIELD_MAPPING,
76
+ url_path_dir3: KEYWORD_FIELD_MAPPING,
77
+ url_port: KEYWORD_FIELD_MAPPING,
78
+ url_scheme: KEYWORD_FIELD_MAPPING
22
79
  }.freeze
23
80
 
24
- def self.default_text_fields_mappings(connectors_index:)
81
+ def self.default_text_fields_mappings(connectors_index:, crawler_index: false)
25
82
  {
26
83
  dynamic: true,
27
84
  dynamic_templates: [
28
85
  {
29
86
  data: {
30
87
  match_mapping_type: 'string',
31
- mapping: {
32
- type: 'text',
33
- analyzer: 'iq_text_base',
34
- index_options: 'freqs',
35
- fields: {
36
- 'stem': {
37
- type: 'text',
38
- analyzer: 'iq_text_stem'
39
- },
40
- 'prefix' => {
41
- type: 'text',
42
- analyzer: 'i_prefix',
43
- search_analyzer: 'q_prefix',
44
- index_options: 'docs'
45
- },
46
- 'delimiter' => {
47
- type: 'text',
48
- analyzer: 'iq_text_delimiter',
49
- index_options: 'freqs'
50
- },
51
- 'joined': {
52
- type: 'text',
53
- analyzer: 'i_text_bigram',
54
- search_analyzer: 'q_text_bigram',
55
- index_options: 'freqs'
56
- },
57
- 'enum': {
58
- type: 'keyword',
59
- ignore_above: ENUM_IGNORE_ABOVE
60
- }
61
- }
62
- }
88
+ mapping: TEXT_FIELD_MAPPING
63
89
  }
64
90
  }
65
91
  ],
66
92
  properties: {
67
- id: {
68
- type: 'keyword'
69
- }
93
+ id: KEYWORD_FIELD_MAPPING
70
94
  }.tap do |properties|
71
95
  properties.merge!(WORKPLACE_SEARCH_SUBEXTRACTION_STAMP_FIELD_MAPPINGS) if connectors_index
96
+ end.tap do |properties|
97
+ properties.merge!(CRAWLER_FIELD_MAPPINGS) if crawler_index
72
98
  end
73
99
  }
74
100
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: connectors_utility
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.4.0.0
4
+ version: 8.4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-14 00:00:00.000000000 Z
11
+ date: 2022-08-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ''
14
14
  email: ent-search-dev@elastic.co
@@ -26,8 +26,8 @@ homepage: https://github.com/elastic/connectors-ruby
26
26
  licenses:
27
27
  - Elastic-2.0
28
28
  metadata:
29
- revision: c9283d0e12a3ae8253225becbefef02d0c6153c8
30
- repository: git@github.com:elastic/connectors.git
29
+ revision: e27a22ea477d0f287ff72a572ef8d025c7ce0e6a
30
+ repository: git@github.com:elastic/ent-search-connectors.git
31
31
  post_install_message:
32
32
  rdoc_options: []
33
33
  require_paths: