Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ public enum CQLFields implements CQLFieldsInterface {
null,
null),
links_title_contains(
StacBasicField.LinksTitle.searchField,
StacBasicField.LinksTitle.displayField,
(literal) -> NestedQuery.of(m -> m
.path(StacBasicField.Links.searchField)// We want the words exact so need to add space in front and end
.query(q -> q
.match(mq -> mq
.field(StacBasicField.LinksTitle.searchField)
.query(literal))))
._toQuery(),
null),
StacBasicField.LinksTitle.searchField,
StacBasicField.LinksTitle.displayField,
(literal) -> NestedQuery.of(m -> m
.path(StacBasicField.Links.searchField)
.query(q -> q
.matchPhrase(mp -> mp
.field(StacBasicField.LinksTitle.searchField)
.query(literal))))
._toQuery(),
null),
links_airole_contains(
StacBasicField.LinksAiRole.searchField,
StacBasicField.LinksAiRole.displayField,
Expand All @@ -196,12 +196,12 @@ public enum CQLFields implements CQLFieldsInterface {
._toQuery(),
null),
credit_contains(
StacSummeries.Credits.searchField,
StacSummeries.Credits.displayField,
(literal) -> MatchQuery.of(m -> m// We want the words exact so need to add space in front and end
.field(StacSummeries.Credits.searchField)
.query(literal))._toQuery(),
null),
StacSummeries.Credits.searchField,
StacSummeries.Credits.displayField,
(literal) -> MatchPhraseQuery.of(m -> m
.field(StacSummeries.Credits.searchField)
.query(literal))._toQuery(),
null),
status(
StacSummeries.Status.searchField,
StacSummeries.Status.displayField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ public void verifyCQLPropertyScore() throws IOException {

// Lower score but the fuzzy is now with operator AND, therefore it will try to match all words 'dataset' and 'includes' with fuzzy
collections = testRestTemplate.getForEntity(getBasePath() + "/collections?q='dataset includes'&filter=score>=1", Collections.class);
assertEquals(3, Objects.requireNonNull(collections.getBody()).getCollections().size(), "hit 1, with score 3");
assertEquals(1, Objects.requireNonNull(collections.getBody()).getCollections().size(), "hit 1, with score 3");
assertEquals("bf287dfe-9ce4-4969-9c59-51c39ea4d011", Objects.requireNonNull(collections.getBody()).getCollections().get(0).getId(), "bf287dfe-9ce4-4969-9c59-51c39ea4d011");

// Increase score will drop two record
Expand Down
Loading