forked from hapifhir/hapi-fhir
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
4,287 additions
and
899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
hapi-fhir-base/src/test/java/ca/uhn/fhir/rest/param/SpecialParamTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package ca.uhn.fhir.rest.param; | ||
|
||
import ca.uhn.fhir.context.FhirContext; | ||
import ca.uhn.fhir.rest.api.Constants; | ||
import ch.qos.logback.classic.Logger; | ||
import ch.qos.logback.classic.spi.ILoggingEvent; | ||
import ch.qos.logback.core.read.ListAppender; | ||
import org.junit.jupiter.api.AfterEach; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.Mock; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
@ExtendWith(MockitoExtension.class) | ||
public class SpecialParamTest { | ||
|
||
private static final Logger ourLog = (Logger) LoggerFactory.getLogger(StringParam.class); | ||
private ListAppender<ILoggingEvent> myListAppender = new ListAppender<>(); | ||
|
||
@Mock | ||
private FhirContext myContext; | ||
|
||
@BeforeEach | ||
public void beforeEach(){ | ||
myListAppender = new ListAppender<>(); | ||
myListAppender.start(); | ||
ourLog.addAppender(myListAppender); | ||
} | ||
|
||
@AfterEach | ||
public void afterEach(){ | ||
myListAppender.stop(); | ||
} | ||
|
||
@Test | ||
public void testEquals() { | ||
SpecialParam specialParam = new SpecialParam(); | ||
specialParam.setValueAsQueryToken(myContext, Constants.PARAM_TEXT, Constants.PARAMQUALIFIER_STRING_CONTAINS, "my-test-value"); | ||
|
||
SpecialParam specialParam2 = new SpecialParam(); | ||
specialParam2.setValueAsQueryToken(myContext, Constants.PARAM_TEXT, Constants.PARAMQUALIFIER_STRING_CONTAINS, "my-test-value"); | ||
assertThat(specialParam).isEqualTo(specialParam2); | ||
} | ||
|
||
@Test | ||
public void testContainsOnlyWorksForSpecificParams() { | ||
SpecialParam specialParamText = new SpecialParam(); | ||
specialParamText.setValueAsQueryToken(myContext, Constants.PARAM_TEXT, Constants.PARAMQUALIFIER_STRING_CONTAINS, "my-test-value"); | ||
assertTrue(specialParamText.isContains()); | ||
|
||
SpecialParam specialParamContent = new SpecialParam(); | ||
specialParamContent.setValueAsQueryToken(myContext, Constants.PARAM_CONTENT, Constants.PARAMQUALIFIER_STRING_CONTAINS, "my-test-value"); | ||
assertTrue(specialParamContent.isContains()); | ||
|
||
SpecialParam nonTextSpecialParam = new SpecialParam(); | ||
nonTextSpecialParam.setValueAsQueryToken(myContext, "name", Constants.PARAMQUALIFIER_STRING_CONTAINS, "my-test-value"); | ||
assertFalse(nonTextSpecialParam.isContains()); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...ca/uhn/hapi/fhir/changelog/7_4_0/5885-improve-combo-param-tx-and-reindex-performance.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
type: perf | ||
issue: 5885 | ||
title: "When unique and non-unique combo parameters are in use on a server, FHIR Transaction and Reindex Job | ||
performance has been optimized by pre-fetching all existing combo index rows for a large batch of resources | ||
in a single database operation. This should yield a meaningful performance improvement on such systems." |
6 changes: 6 additions & 0 deletions
6
...sources/ca/uhn/hapi/fhir/changelog/7_4_0/5885-improve-nonunique-combo-param-indexing.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
type: perf | ||
issue: 5885 | ||
title: "Indexing for non-unique combo Search Parameters has been improved, | ||
using a new hash-based index that should perform significantly better in | ||
many circumstances." |
7 changes: 7 additions & 0 deletions
7
...esources/ca/uhn/hapi/fhir/changelog/7_4_0/5885-improve-unique-combo-param-reindexing.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
type: perf | ||
issue: 5885 | ||
title: "Indexing for unique combo Search Parameters has been modified so that a hash | ||
value is now stored. This hash value is not yet used in searching or enforcing uniqueness, | ||
but will be in the future in order to reduce the space required to store the indexes and the | ||
current size limitation on unique indexes." |
7 changes: 7 additions & 0 deletions
7
...ces/ca/uhn/hapi/fhir/changelog/7_4_0/6044-fix-issue-with-cache-refresh-infinite-loop.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
type: fix | ||
issue: 6044 | ||
title: "Fixed an issue where doing a cache refresh with advanced Hibernate Search | ||
enabled would result in an infinite loop of cache refresh -> search for | ||
StructureDefinition -> cache refresh, etc | ||
" |
4 changes: 4 additions & 0 deletions
4
...resources/ca/uhn/hapi/fhir/changelog/7_4_0/6046-failed-text-and-content-search-in-r5.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
type: fix | ||
issue: 6046 | ||
title: "Previously, using `_text` and `_content` searches in Hibernate Search in R5 was not supported. This issue has been fixed." |
5 changes: 5 additions & 0 deletions
5
hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_4_0/6046-text-contains.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
type: add | ||
issue: 6046 | ||
title: "Added support for `:contains` parameter qualifier on the `_text` and `_content` Search Parameters. When using Hibernate Search, this will cause | ||
the search to perform an substring match on the provided value. Documentation can be found [here](/hapi-fhir/docs/server_jpa/elastic.html#performing-fulltext-search-in-luceneelasticsearch)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.