Skip to content

Commit 05a406e

Browse files
committed
yay
1 parent 0dd1cae commit 05a406e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

search-api/src/main/scala/no/ndla/searchapi/service/search/IndexService.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ trait IndexService {
9797
booleanField("isVisible"),
9898
keywordField("url"),
9999
keywordField("resourceTypeIds")
100-
)
100+
) ++
101+
// TODO: Finish mapping up breadcrumbs, check that this is right and do it everywhere
102+
languageValuesMapping("breadcrumbs", keepRaw = true)
101103
)
102104
}
103105
}

search-api/src/main/scala/no/ndla/searchapi/service/search/SearchService.scala

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ trait SearchService {
8787
val skipChars = List("+", "|", "-", "\"", "*", "(", ")", "~")
8888
if (skipChars.exists(query.underlying.contains)) return List.empty
8989

90+
// TODO: Should we set boost according to which level the breadcrumb is on?
9091
val subQueries = buildMatchQueryForField(query, "contexts.breadcrumbs", language, fallback, boost)
9192
val sq = boolQuery().should(subQueries)
9293
List(nestedQuery("contexts", sq))

0 commit comments

Comments
 (0)