-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fixing fulltext search wit h_lastUpdated filter #6411
base: rel_7_6
Are you sure you want to change the base?
Conversation
Formatting check succeeded! |
...rc/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6404-fulltext-search-with-lastupdate.yaml
Show resolved
Hide resolved
hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/upgrade.md
Outdated
Show resolved
Hide resolved
...ir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchSearchBuilder.java
Show resolved
Hide resolved
...ir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchSearchBuilder.java
Show resolved
Hide resolved
...ir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchSearchBuilder.java
Show resolved
Hide resolved
hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSearchDaoR4Test.java
Outdated
Show resolved
Hide resolved
hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSearchDaoR4Test.java
Outdated
Show resolved
Hide resolved
# Fulltext Search with _lastUpdated Filter | ||
|
||
Fulltext searches have been updated to support `_lastUpdated` search parameter. A reindexing of Search Parameters | ||
is required to migrate old data to support the `_lastUpdated` search parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be expanded to clarify under what exact conditions it would be necessary to do this, since requiring a reindex of all of your data is a huge ask.. Presumably this only matters if XXX is set to YYY and you are intending to perform a search containing ZZZ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kinda required if you're using lucene/fulltext search at all.
Currently, any searches with _lastIndex
will not use lucene (if that's the only parameter).
If _lastIndex
is provided with any other parameter, it will not work.
This includes in our $mdm-clear
job (which was the original bug reported)
if (myFulltextSearchSvc != null && !myFulltextSearchSvc.isDisabled()) { | ||
if (myFulltextSearchSvc != null && !myFulltextSearchSvc.isDisabled() && changed.isChanged()) { | ||
// set the lastUpdated dates so we can use them to search in lucene | ||
theResource.getMeta().setLastUpdated(theTransactionDetails.getTransactionDate()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a super weird thing to be doing here. Why is it necessary to modify the resource passed in? We index the entity, not the FHIR resource model class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fields to index are determined by what's in the resource (not the entity) since the resource contains the changed fields.
ExtendedHSearchIndexExtractor
is where we create the ExtendedHSearchIndexData
and SearchParamTextPropertyBinder
is what consumes it to wrie the indexes
closes #6404