Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Search
Commits
9f5b3b7e
Commit
9f5b3b7e
authored
Jun 25, 2021
by
neelesh thakur
Browse files
fix bug with sort on multi text field in a request
parent
a8a9b20e
Pipeline
#48417
failed with stages
in 78 minutes and 41 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
search-core/src/main/java/org/opengroup/osdu/search/service/FieldMappingTypeService.java
View file @
9f5b3b7e
...
...
@@ -85,10 +85,11 @@ public class FieldMappingTypeService implements IFieldMappingTypeService {
for
(
Map
.
Entry
<
String
,
Map
<
String
,
GetFieldMappingsResponse
.
FieldMappingMetadata
>>
indexMapping
:
mappings
.
entrySet
())
{
if
(
indexMapping
.
getValue
().
isEmpty
())
continue
;
Map
<
String
,
GetFieldMappingsResponse
.
FieldMappingMetadata
>
typeMapping
=
indexMapping
.
getValue
();
GetFieldMappingsResponse
.
FieldMappingMetadata
fieldMappingMetaData
=
typeMapping
.
values
().
iterator
().
next
();
if
(
fieldMappingMetaData
==
null
)
continue
;
String
field
=
fieldMappingMetaData
.
fullName
();
fieldTypeMap
.
put
(
field
.
substring
(
0
,
field
.
lastIndexOf
(
".keyword"
)),
field
);
for
(
Map
.
Entry
<
String
,
GetFieldMappingsResponse
.
FieldMappingMetadata
>
fieldMappingMetadataEntry
:
typeMapping
.
entrySet
())
{
if
(
fieldMappingMetadataEntry
.
getValue
()
==
null
)
continue
;
String
field
=
fieldMappingMetadataEntry
.
getValue
().
fullName
();
fieldTypeMap
.
put
(
field
.
substring
(
0
,
field
.
lastIndexOf
(
".keyword"
)),
field
);
}
}
this
.
typeMappingCache
.
put
(
cacheKey
,
fieldTypeMap
);
...
...
testing/integration-tests/search-test-core/src/main/resources/features/query/singlecluster/Query.feature
View file @
9f5b3b7e
...
...
@@ -163,7 +163,7 @@ Feature: Search with different queries
Then I should get records in right order first record id
:
<first_record_id>, last record id
:
<last_record_id>
Examples
:
|
kind
|
query
|
sort
|
first_record_id
|
last_record_id
|
|
"tenant1:testquery<timestamp>:well:*"
|
None
|
{"field":["data.OriginalOperator"
],"order":["ASC"]}
|
"test:well:1.0.0:1"
|
"test:well:2.0.0:3"
|
|
"tenant1:testquery<timestamp>:well:*"
|
None
|
{"field":["data.OriginalOperator"
,"data.WellType"],"order":["ASC",
"ASC"]}
|
"test:well:1.0.0:1"
|
"test:well:2.0.0:3"
|
|
"tenant1:testquery<timestamp>:well:*"
|
None
|
{"field":["id"],"order":["DESC"]}
|
"test:well:2.0.0:3"
|
"test:well:1.0.0:1"
|
|
"tenant1:testquery<timestamp>:well:*"
|
None
|
{"field":["namespace","data.Rank"],"order":["ASC","DESC"]}
|
"test:well:1.0.0:3"
|
"test:well:2.0.0:1"
|
|
"tenant1:testnestedquery<timestamp>:well:2.0.0"
|
None
|
{"field":["nested(data.VerticalMeasurements,
VerticalMeasurement,
min)"],"order":["ASC"]}
|
"test:well:1.0.0:2"
|
"test:well:1.0.0:1"
|
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment