This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
41
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
1a8e904c
Commit
1a8e904c
authored
2 years ago
by
eduardDeploy
Browse files
Options
Downloads
Plain Diff
Merge branch '353-warning_from_logfile' into keycloak_theme
parents
14e22eb5
9a04ca49
Branches
Branches containing commit
3 merge requests
!166
Deploying Februrar 23 Release
,
!158
Keycloak theme
,
!146
Put the sonar-analyze job into a separate stage
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/at/ac/uibk/gitsearch/repository/search/MetaDataRepository.java
+10
-3
10 additions, 3 deletions
.../uibk/gitsearch/repository/search/MetaDataRepository.java
with
10 additions
and
3 deletions
src/main/java/at/ac/uibk/gitsearch/repository/search/MetaDataRepository.java
+
10
−
3
View file @
1a8e904c
...
...
@@ -286,8 +286,8 @@ public class MetaDataRepository {
tryNextPage
=
searchResponse
.
getHits
().
getHits
().
length
>
0
;
for
(
SearchHit
searchHit
:
searchResponse
.
getHits
().
getHits
())
{
final
String
sourceAs
JSON
=
searchHit
.
getSourceAsString
();
SearchResultDTO
entry
=
objectMapper
.
readValue
(
sourceAs
JSON
,
SearchResultDTO
.
class
);
final
String
sourceAs
String
=
filterDateString
(
searchHit
.
getSourceAsString
()
)
;
SearchResultDTO
entry
=
objectMapper
.
readValue
(
sourceAs
String
,
SearchResultDTO
.
class
);
if
(
entry
.
getMetadata
().
getKeyword
()
!=
null
)
{
for
(
String
keyWord
:
entry
.
getMetadata
().
getKeyword
())
{
addTo
(
reloadedCachedCompletions
.
get
(
SearchRepositoryConstants
.
METADATA_KEYWORDS
),
split
(
keyWord
),
keyWord
);
...
...
@@ -330,6 +330,12 @@ public class MetaDataRepository {
cachedCompletions
=
reloadedCachedCompletions
;
}
public
static
String
filterDateString
(
String
sourceAsJSON
)
{
String
result
=
sourceAsJSON
.
replaceAll
(
"[+-]\\d{2}:\\d{2}"
,
""
);
return
result
;
}
/**
* returns a preconfigured object mapper
*
...
...
@@ -683,7 +689,8 @@ public class MetaDataRepository {
}
private
static
SearchResultDTO
parseSearchHit
(
SearchHit
searchHit
,
ObjectMapper
objectMapper
)
throws
JsonProcessingException
{
final
SearchResultDTO
mappedValue
=
objectMapper
.
readValue
(
searchHit
.
getSourceAsString
(),
SearchResultDTO
.
class
);
String
sourceAsString
=
filterDateString
(
searchHit
.
getSourceAsString
());
final
SearchResultDTO
mappedValue
=
objectMapper
.
readValue
(
sourceAsString
,
SearchResultDTO
.
class
);
mappedValue
.
setExerciseId
(
searchHit
.
getId
());
return
mappedValue
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment