8941 adding file count in solr (v2)
This PR is following the closed PR #9823 with a branch up to date and more details.
What this PR does / why we need it:
This PR handles 2 subjects as one go :
- adding file count of a dataset version directly in solr Document (useful for API Search uses, ex: searching for datasets without file
http://localhost:8080/api/search?q=fileCount:0) - moved the work of calculating the file count of a dataset version in indexing part instead of result json building, meaning : speed up the response when using big item number per page (ex :
&per_page=1000)
two birds one stone
Which issue(s) this PR closes:
- Closes #8941
Special notes for your reviewer:
As the original PR was not merged after 9 month in open state, some competing developments were made on the same lines of code. I just finished the rework after merging develop a0028c3 and noticed that @GPortas was related to those developments. @GPortas can you please be part of reviewers and approve this PR ?
Suggestions on how to test this:
Checking Search API results of dataset version with files and no file.
Is there a release notes update needed for this change?:
May be not required, tell me.
Demo:
https://github.com/IQSS/dataverse/assets/83018819/056801a7-3e37-4e33-9c4e-e4891d3b4f17
Screenshot of API Search result of the same dataset after publishing