Skip to content

Search Improvements (OS/ES support) #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 64 commits into from
Mar 5, 2025
Merged

Conversation

patrick-austin
Copy link
Contributor

Covers a variety of improvements to free text search functionality.
Closes #267

Changes to functionality

  • Expanded the number of fields that are indexed and searchable across various entities
  • Metadata from a search comes directly from Lucene, rather than returning a list of ids that then require a subsequent DB call.
    • In addition to performing authorisation on the main returned entity (Investigation/Dataset/Datafile), we also use the public steps/tables to safely return nested information (such as a DatafileParameter without additional time spent authorising)
  • Support for faceting of results, sorting, searching after, flexible batches of search results
  • Support for other search engines, specifically Opensearch/Elasticsearch
    • Note that a branch without the Opensearch code but all the other features exists

Changes to code

  • Various entities have had getDoc either added or expanded, alongside the addition of getDocumentFields which enforces that the search component does not return metadata that isn't allowed by the ICAT public steps/tables
  • Modified existing search functions in ICATRest and added new endpoints search/documents and facet/documents
  • Changes to EntityBeanManager to support new search calls
  • Small additions to GateKeeper to allow the publicly allowed search fields to be marked as stale and updated as public steps/tables are updated
  • Changes to PropertyHandler to support different SearchEngines as config options as well as other new config parameters
  • LuceneManager replaced with generic SearchManager which interacts with the search engine via an instance of SearchApi
  • Creation of SearchApi, and abstract class for interfacing with search engine implementations
  • LuceneApi modified extensively, and now extends SearchApi
  • Creation of OpensearchApi which extends SearchApi and supports either Opensearch or Elasticsearch clusters by building generic JSON. Also has some static functionality refactored into supporting classes:
    • OpensearchQueryBuilder
    • OpensearchScriptBuilder
  • Creation of FacetDimension and FacetLabel to represent facets of results, and replacing LuceneSearchResult with SearchResult which has facet support
  • Various small changes to rename variables from luceneAbc to searchAbc to reflect what is or isn't specific to the icat.lucene search engine
  • Updated tests

Interdependencies on other components

patrick-austin and others added 30 commits February 1, 2022 19:58
@patrick-austin patrick-austin requested a review from VKTB October 21, 2022 13:09
@ajkyffin ajkyffin force-pushed the 267_opensearch_support branch from 6c27f0d to 200cb3a Compare October 30, 2024 11:34
@patrick-austin patrick-austin marked this pull request as ready for review March 5, 2025 14:57
@patrick-austin patrick-austin merged commit 8ee6a71 into master Mar 5, 2025
0 of 2 checks passed
@patrick-austin patrick-austin deleted the 267_opensearch_support branch March 5, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility with icat.lucene upgrades
3 participants