-
Notifications
You must be signed in to change notification settings - Fork 1
/
wmsearch.services.yml
128 lines (105 loc) · 3.86 KB
/
wmsearch.services.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
parameters:
wmsearch.elastic.endpoint: 'http://localhost:9200'
wmsearch.elastic.index: ''
wmsearch.simple_search: false
wmsearch.json.path: '/search/json'
wmsearch.json.formatter.class: 'Drupal\wmsearch\Service\ResultFormatter'
wmsearch.json.query_builder.class: 'Drupal\wmsearch\Service\QueryBuilder'
# Entity types the "drush wmsearch:queue" command will queue for indexing
wmsearch.indexer.entity_types:
- node
- taxonomy_term
wmsearch.http.config: { }
services:
wmsearch.http.client.factory:
class: Drupal\wmsearch\Service\HttpClientFactory
wmsearch.http.client:
class: GuzzleHttp\Client
factory: ['@wmsearch.http.client.factory', create]
arguments:
- '%wmsearch.http.config%'
wmsearch.api.base:
class: Drupal\wmsearch\Service\Api\BaseApi
arguments:
- '%wmsearch.elastic.endpoint%'
- '@wmsearch.http.client'
wmsearch.api.index:
class: Drupal\wmsearch\Service\Api\IndexApi
parent: wmsearch.api.base
arguments:
- '%app.root%'
- '%wmsearch.elastic.index%'
- '@module_handler'
- '@event_dispatcher'
- '@file_system'
- '@wmsearch.api.alias'
- '@wmsearch.api.reindex'
- '@wmsearch.api.task'
- '@wmsearch.document_collection.manager'
wmsearch.api.alias:
class: Drupal\wmsearch\Service\Api\AliasApi
parent: wmsearch.api.base
wmsearch.api.reindex:
class: Drupal\wmsearch\Service\Api\ReindexApi
parent: wmsearch.api.base
wmsearch.api.search:
class: Drupal\wmsearch\Service\Api\SearchApi
parent: wmsearch.api.base
arguments:
- '%wmsearch.elastic.index%'
wmsearch.api.stats:
class: Drupal\wmsearch\Service\Api\StatsApi
parent: wmsearch.api.base
arguments:
- '@wmsearch.api.alias'
wmsearch.api.task:
class: Drupal\wmsearch\Service\Api\TaskApi
parent: wmsearch.api.base
wmsearch.document_collection.manager:
class: Drupal\wmsearch\Service\DocumentCollectionManager
arguments:
- '@class_resolver'
- '@keyvalue'
wmsearch.document_collection.entity:
class: Drupal\wmsearch\Entity\Document\EntityDocumentCollection
shared: false
wmsearch.html_stripper:
class: Drupal\wmsearch\Service\HtmlStripper
wmsearch.json.query_builder:
class: '%wmsearch.json.query_builder.class%'
wmsearch.json.formatter:
class: '%wmsearch.json.formatter.class%'
wmsearch.routing.disable_simple_search:
class: Drupal\wmsearch\Routing\DisableSimpleSearchSubscriber
arguments:
- '%wmsearch.simple_search%'
tags: [{ name: event_subscriber }]
wmsearch.middleware.early_json:
class: Drupal\wmsearch\Middleware\EarlyJson
arguments:
- '@wmsearch.api.search'
- '@wmsearch.json.formatter'
- '@wmsearch.json.query_builder'
- '%wmsearch.json.path%'
tags:
- { name: http_middleware, priority: 250, responder: true }
wmsearch.stopwords_mapping.subscriber:
class: Drupal\wmsearch\EventSubscriber\StopwordsMappingSubscriber
arguments:
- '@language_manager'
- '@state'
tags: [{ name: event_subscriber }]
wmsearch.batch.index:
class: Drupal\wmsearch\Service\Batch\IndexBatch
arguments:
- '@messenger'
- '@plugin.manager.queue_worker'
- '@queue'
wmsearch.batch.queue:
class: Drupal\wmsearch\Service\Batch\QueueBatch
arguments:
- '@logger.factory'
- '@entity_type.manager'
- '@entity.memory_cache'
- '@messenger'
- '%wmsearch.indexer.entity_types%'