Skip to content

Query company profile information that is sorted in an alphabetical order. The service also provides an option to add or update companies used for the search.

License

Notifications You must be signed in to change notification settings

companieshouse/search.api.ch.gov.uk

Repository files navigation

search.api.ch.gov.uk

Provides functionality to query the alpha_search index, and the dissolved search index within Elastic Search to return company profile information that is sorted in alphabetical order. In the case of the dissolved search index, this will currently only be companies which have been dissolved prior to 2009. The service also provides the ability to ‘upsert’ a company. This feature allows the data present within elastic search to be up to date, providing an option to add new companies or update the existing. The search.api.ch.gov.uk at present relates only to alphabetical-search & dissolved search, though potentially may encapsulate advanced search and search in general.

Requirements

In order to build document-generator locally you will need the following:

Getting started

  1. Run make
  2. Run ./start.sh

Environment Variables

The supported environmental variables have been categorised by use case and are as follows.

Deployment Variables

Name Description Mandatory Default Example
ELASTIC_SEARCH_URL elastic search cluster hostname for alphabetical search index https://es7-alphabetical-hostname.aws.chdev.org
DISSOLVED_SEARCH_URL elastic search cluster hostname for dissolved search index https://es7-dissolved-hostname.aws.chdev.org
ADVANCED_SEARCH_URL elastic search cluster hostname for advanced search index https://es7-advanced-hostname.aws.chdev.org
PRIMARY_SEARCH_URL elastic search cluster hostname for primary search index https://es7-primary-hostname.aws.chdev.org
------------------------------------------- ---------------------------------------------------------------------------- --------- ------- ------------------------------------------------
ALPHAKEY_SERVICE_URL pointer to alphakey service http://alpha-key-hostname/alphakey?name=
------------------------------------------- ---------------------------------------------------------------------------- --------- ------- ------------------------------------------------
ALPHABETICAL_SEARCH_INDEX elastic search index name for the alphabetical search alpha-search
DISSOLVED_SEARCH_INDEX elastic search index name for the dissolved search dissolved-search
ADVANCED_SEARCH_INDEX elastic search index name for the advanced search advanced-search
PRIMARY_SEARCH_INDEX elastic search index name for the primary search primary search
------------------------------------------- ---------------------------------------------------------------------------- --------- ------- ------------------------------------------------
ALPHABETICAL_SEARCH_RESULT_MAX max results returned for alphabetical search before filtering to 20 20
DISSOLVED_SEARCH_RESULT_MAX max results for the dissolved search before filtering to 20 20
DISSOLVED_ALPHABETICAL_SEARCH_RESULT_MAX max results for the dissolved alphabetical search before filtering 20
ADVANCED_SEARCH_MAX_SIZE max results for the advanced search 5000
ADVANCED_SEARCH_DEFAULT_SIZE default size for advanced search 20
MAX_SIZE_PARAM maximum value of size parameter 100
ALPHABETICAL_FALLBACK_QUERY_LIMIT fallback query limit for alphabetical search 25
DISSOLVED_ALPHABETICAL_FALLBACK_QUERY_LIMIT fallback query limit for dissolved alphabetical search 15

Endpoints

Method Path Description
GET /dissolved-search/companies Returns the dissolved company search results
PUT /disqualified-search/disqualified-officers/{officer_id} Insert/update the officer details
DELETE /disqualified-search/delete/{officer_id} Delete the officer details
GET /advanced-search/companies Returns the advanced search company results
PUT /advanced-search/companies/{company_number} Insert/update the company details
DELETE /advanced-search/companies/{company_number} Delete the company details
PUT /officers-search/officers/{officer_id} Insert/update the officer details
DELETE /officers-search/officers/{officer_id} Delete the officer details
GET /alphabetical-search/companies Returns the alphabetical company search results
PUT /alphabetical-search/companies/{company_number} Insert/update the company details
DELETE /alphabetical-search/companies/{company_number} Delete the company details
GET /search/healthcheck Returns the healthcheck result for the search service
PUT /company-search/companies/{company_number}
DELETE /company-search/companies/{company_number} Delete the company details

About

Query company profile information that is sorted in an alphabetical order. The service also provides an option to add or update companies used for the search.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 33

Languages