The Housing Search Api is the LBH Api responsible for searching for persons, tenures and assets.
Swagger Hub - https://app.swaggerhub.com/apis/Hackney/housingSearchApi/1.0.0
- .NET 6 as a web framework.
- xUnit as a test framework.
- ElasticSearch as a datastore.
- Selwyn Preston, Lead Developer at London Borough of Hackney (selwyn.preston@hackney.gov.uk)
- Mirela Georgieva, Lead Developer at London Borough of Hackney (mirela.georgieva@hackney.gov.uk)
- Matt Keyworth, Lead Developer at London Borough of Hackney (matthew.keyworth@hackney.gov.uk)
- Rashmi Shetty, Product Owner at London Borough of Hackney (rashmi.shetty@hackney.gov.uk)
- Unit Tests
- BDDFy for E2E tests
You will need to create a new controller and expose a new search endpoint. Refer to any of the existing ones, as well as to the Swagger Hub ( https://app.swaggerhub.com/apis/Hackney/housingSearchApi/1.0.0 ) regarding the request and response format. Most of our searches use the same HousingSearchQuery for a request. The response will vary based on the information you are requesting.
Each new search requires a new search usecase. Create and name one appropriately
Each usecase calls on the search gateway in order to perform a search. Search gateway acts as a medium between the use cases and the actual elastic server. You can create your own method similarly to the existing ones. In fact, the only difference between them will be the response types returned.
Using NEST for ElasticSearch (https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/introduction.html) generate the query you wish to run against the ElasticSearchServer. Once done, add the type to the QueryFactory (A Generic based factory that returns query generators based on the query search type)
If you need sorting, create a relevant and add it to the SortFactory. By default, sorting is done based on ranking.