Skip to content

Commit

Permalink
Discoverer v2 support. Spelling suggestions feature
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispenny committed Oct 29, 2024
1 parent c9b9f5c commit d22b0b2
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{*.yml}]
[*.yml]
indent_size = 2
indent_style = space

Expand Down
24 changes: 24 additions & 0 deletions _config/adaptors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
Name: discoverer-bifrost-adaptors
After: discoverer-adaptors
Only:
envvarset: 'BIFROST_QUERY_API_KEY'
---
SilverStripe\Core\Injector\Injector:
SilverStripe\Discoverer\Query\Facet\FacetAdaptor:
class: SilverStripe\DiscovererElasticEnterprise\Query\Facet\FacetAdaptor
SilverStripe\Discoverer\Query\Filter\CriteriaAdaptor:
class: SilverStripe\DiscovererElasticEnterprise\Query\Filter\CriteriaAdaptor
SilverStripe\Discoverer\Query\Filter\CriterionAdaptor:
class: SilverStripe\DiscovererElasticEnterprise\Query\Filter\CriterionAdaptor
SilverStripe\Discoverer\Service\Interfaces\ProcessAnalyticsAdaptor:
class: SilverStripe\DiscovererElasticEnterprise\Service\Adaptors\ProcessAnalyticsAdaptor
SilverStripe\Discoverer\Service\Interfaces\QuerySuggestionAdaptor:
class: SilverStripe\DiscovererElasticEnterprise\Service\Adaptors\QuerySuggestionAdaptor
SilverStripe\Discoverer\Service\Interfaces\SearchAdaptor:
class: SilverStripe\DiscovererElasticEnterprise\Service\Adaptors\SearchAdaptor
SilverStripe\Discoverer\Service\Interfaces\SpellingSuggestionAdaptor:
class: SilverStripe\DiscovererElasticEnterprise\Service\Adaptors\SpellingSuggestionAdaptor

SilverStripe\DiscovererElasticEnterprise\Service\Adaptors\BaseAdaptor:
prefix_env_var: 'BIFROST_ENGINE_PREFIX'
29 changes: 0 additions & 29 deletions _config/config.yml

This file was deleted.

12 changes: 12 additions & 0 deletions _config/factory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
Name: discoverer-bifrost-factory
Only:
envvarset: 'BIFROST_QUERY_API_KEY'
---
SilverStripe\Core\Injector\Injector:
Elastic\EnterpriseSearch\Client.searchClient:
factory: SilverStripe\DiscovererBifrost\Service\ClientFactory
constructor:
host: '`BIFROST_ENDPOINT`'
token: '`BIFROST_QUERY_API_KEY`'
http_client: '%$GuzzleHttp\Client'
12 changes: 12 additions & 0 deletions _config/requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
Name: discoverer-bifrost-requests
Only:
envvarset: 'BIFROST_QUERY_API_KEY'
---
SilverStripe\Core\Injector\Injector:
Elastic\EnterpriseSearch\AppSearch\Request\Search:
class: SilverStripe\DiscovererBifrost\Service\Requests\Search
Elastic\EnterpriseSearch\AppSearch\Request\LogClickthrough:
class: SilverStripe\DiscovererBifrost\Service\Requests\ClickPost
Elastic\EnterpriseSearch\AppSearch\Request\QuerySuggestion:
class: SilverStripe\DiscovererBifrost\Service\Requests\QuerySuggestion

0 comments on commit d22b0b2

Please sign in to comment.