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

Finding several documents by their title in a single query #696

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

archiloque
Copy link
Contributor

@archiloque archiloque commented Jun 6, 2023

It's an enhancement of the searching by title added in d98c1bd , it allow to specify several titles at the same time so all the corresponding documents are returned.

At first I though about adding a new parameter but at the end I noticed the tag parameter can be specified several times so I used the same approach.

Our use case is to be able to quickly download several files scattered in several documents from their titles and with this we can do it with only two calls:

  1. one API calls find all the documents and their files from the document's name
  2. one API call download the zipped files

As some times we deal with lots of files, it means we can do it with a synchronous call instead of doing it in an asynchronous job.

I had to introduce another thing (and I'm not too happy about it, so alternative suggestions are welcome) is to make the document search endpoint available as a POST call, because when when I search for a lot of documents at the same time the GET URI's are becoming too long and I get URI Too Long errors.

Julien Kirch added 2 commits June 5, 2023 18:00
@archiloque archiloque changed the title Finding for several documents by their title in a single query Finding several documents by their title in a single query Jun 6, 2023
@jendib
Copy link
Member

jendib commented Jun 6, 2023

Great job. I'm ok with the POST endpoint, it's still better than Elasticsearch approach of having a GET endpoint with a request body.

@jendib jendib merged commit 22a44d0 into sismics:master Jun 6, 2023
@archiloque archiloque deleted the titles branch June 7, 2023 05:57
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.

None yet

2 participants