Skip to content

Modification time in search indexes - #522

Merged
brianjlowe merged 3 commits into
vivo-project:mainfrom
litvinovg:modification-time
Jun 19, 2026
Merged

Modification time in search indexes#522
brianjlowe merged 3 commits into
vivo-project:mainfrom
litvinovg:modification-time

Conversation

@litvinovg

@litvinovg litvinovg commented May 4, 2026

Copy link
Copy Markdown
Member

Related to VIVO 4118

VIVO PR

What does this pull request do?

  • Added modification time field in search index.
  • Removed excessive quotation mark in profileUrl value.

How should this be tested?

Try with Solr and ElasticSearch:

  • Rebuild search index
  • Download search results as XML, check modification date column

Interested parties

@VIVO-project/vivo-committers

Reviewers' expertise

Candidates for reviewing this PR should have some of the following expertises:

  1. Java

Reviewers' report template

General comment

A reviewer should provide here comments and suggestions for requested changes if any.

Testing

A reviewer should briefly describe here how it was tested

Code reviewing

A reviewer should briefly describe here which part was code reviewed

@chenejac chenejac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@litvinovg this is working in Vitro, but not in VIVO. For me it is working for VIVO only if I add

<str name="modTime">${individual.modTime?xml}</str>

into

https://github.com/vivo-project/VIVO/blob/main/webapp/src/main/webapp/templates/freemarker/body/search/search-xmlResults.ftl

The code looks good to me.

@litvinovg

Copy link
Copy Markdown
Member Author

Open

@litvinovg this is working in Vitro, but not in VIVO. For me it is working for VIVO only if I add

<str name="modTime">${individual.modTime?xml}</str>

into

https://github.com/vivo-project/VIVO/blob/main/webapp/src/main/webapp/templates/freemarker/body/search/search-xmlResults.ftl

The code looks good to me.

@litvinovg
litvinovg requested a review from chenejac May 8, 2026 16:44
@brianjlowe

Copy link
Copy Markdown
Member

How does this relate to the existing timestamp and etag fields? I wonder if there is a way to have the timestamp field updated only when the etag signature field value changes, so that reindexes don't show up as new modifications.

@brianjlowe
brianjlowe self-requested a review May 8, 2026 21:37
@litvinovg

Copy link
Copy Markdown
Member Author

Etag and timestamp are only implemented in Solr. From what I know Elastic Search doesn't currently have similar functionality. I think we can switch to using implementation specific realizations once we have it supported by ES and Solr.

@brianjlowe
brianjlowe merged commit ec30049 into vivo-project:main Jun 19, 2026
1 check passed
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.

3 participants