Skip to content

Commit 0b53855

Browse files
committed
KCBC-169 FIT performer: honor FTS 'explain'
Change-Id: Ie8a6e7dbe0bc18b5308c2137a4e1759481333bcf Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/211372 Tested-by: Build Bot <[email protected]> Reviewed-by: David Nault <[email protected]>
1 parent 17e6171 commit 0b53855

File tree

1 file changed

+6
-0
lines changed
  • kotlin-fit-performer/src/main/kotlin/com/couchbase/client/performer/kotlin/search

1 file changed

+6
-0
lines changed

kotlin-fit-performer/src/main/kotlin/com/couchbase/client/performer/kotlin/search/SearchHelper.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ private data class SearchParams(
178178
val facets: List<SearchFacet>
179179
get() = options?.facetsMap?.entries?.map { it.value.toSdk(it.key) } ?: emptyList()
180180

181+
val explain: Boolean
182+
get() = options?.let { if (it.hasExplain()) it.explain else null } ?: false
183+
181184
val consistency: SearchScanConsistency
182185
get() = options?.consistency ?: SearchScanConsistency.notBounded()
183186

@@ -272,6 +275,7 @@ class SearchHelper {
272275
highlight = params.highlight,
273276
includeLocations = params.includeLocations,
274277
facets = params.facets,
278+
explain = params.explain,
275279
).execute()
276280
}
277281

@@ -300,6 +304,7 @@ class SearchHelper {
300304
highlight = params.highlight,
301305
includeLocations = params.includeLocations,
302306
facets = params.facets,
307+
explain = params.explain,
303308
).execute()
304309
} else {
305310
cluster.searchQuery(
@@ -314,6 +319,7 @@ class SearchHelper {
314319
highlight = params.highlight,
315320
includeLocations = params.includeLocations,
316321
facets = params.facets,
322+
explain = params.explain,
317323
).execute()
318324
}
319325
}

0 commit comments

Comments
 (0)