Skip to content
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

Search improvements #33

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Search improvements #33

wants to merge 12 commits into from

Conversation

patrick-austin
Copy link
Contributor

Add support for new Lucene based free text search functionality:

  • new searchInvestigations accepting additional parameters such as facets and sorting
  • new searchInvestigations accepting additional parameters such as facets and sorting
  • new searchInvestigations accepting additional parameters such as facets and sorting
  • changes to existing lucenePopulate so that the client call and resultant behaviour is unchanged, but it gives the parameters that icat.server now expects

Note that existing methods for searching are unchanged (these have less features and only return ids rather than full documents).

@patrick-austin patrick-austin changed the title 27 search improvements Search improvements Aug 17, 2022
@patrick-austin patrick-austin requested a review from VKTB September 13, 2022 14:26
Copy link

@VKTB VKTB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

I did notice code duplication in the searchInvestigations, searchDatasets and searchDatafiles methods in the ICAT class which could probably be avoided by refactoring the common logic into a new method that these methods can call.

@patrick-austin
Copy link
Contributor Author

I did notice code duplication in the searchInvestigations, searchDatasets and searchDatafiles methods in the ICAT class which could probably be avoided by refactoring the common logic into a new method that these methods can call.

Yeah you're right, a lot of the JSON building could be refactored. I might leave the old searchInvestigations, searchDatasets and searchDatafiles functions (those that are called by the Topcat-style endpoint) unchanged, since we'd delete them in a future version anyway, but there's no reason to duplicate code like they did in our new functions.

@patrick-austin patrick-austin requested a review from VKTB September 26, 2022 10:44
@VKTB
Copy link

VKTB commented Sep 26, 2022

This looks much nicer now, thank you for making the changes @patrick-austin. I forgot to say initially but, yes, the deprecated methods do not need to be updated.

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.

2 participants