Skip to content

Commit 8bfb469

Browse files
committed
Remove logs
1 parent dbdacc8 commit 8bfb469

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

src/adapter/search-response-adapter/format-adapter/format-adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ export function adaptFormating(
3232
_highlightResult,
3333
_snippetResult,
3434
}
35-
console.log(highlightedHit)
35+
3636
return highlightedHit
3737
}

src/adapter/search-response-adapter/format-adapter/highlight-adapter.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ export function adaptHighlight(
6969
if (!hit._formatted) return hit._formatted
7070
return Object.keys(hit._formatted).reduce((result, key) => {
7171
const value = hit._formatted[key]
72-
// console.log(value)
7372

7473
result[key] = resolveHighlightValue(value, preTag, postTag)
7574
return result

src/adapter/search-response-adapter/format-adapter/snippet-adapter.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ function nakedOfTags(str: string) {
66

77
function addEllipsis(value: any, formatValue: string, ellipsis: string): any {
88
// Manage ellpsis on cropped values until this feature is implemented https://roadmap.meilisearch.com/c/69-policy-for-cropped-values?utm_medium=social&utm_source=portal_share in MeiliSearch
9-
// console.log({ value, formatValue, ellipsis })
10-
let ellipsedValue = formatValue
119

12-
// console.log('formatValue', formatValue, nakedOfTags(formatValue).length)
13-
// console.log('value', value, value.toString().length)
10+
let ellipsedValue = formatValue
1411

1512
if (
1613
isString(formatValue) &&
@@ -20,15 +17,13 @@ function addEllipsis(value: any, formatValue: string, ellipsis: string): any {
2017
formatValue[0] === formatValue[0].toLowerCase() && // beginning of a sentence
2118
formatValue.startsWith('<em>') === false // beginning of the document field, otherwise MeiliSearch would crop around the highlight
2219
) {
23-
console.log('Front')
2420
ellipsedValue = `${ellipsis}${formatValue.trim()}`
2521
}
2622
if (!!formatValue.match(/[.!?]$/) === false) {
2723
// end of the sentence
2824
ellipsedValue = `${formatValue.trim()}${ellipsis}`
2925
}
3026
}
31-
console.log(ellipsedValue)
3227
return ellipsedValue
3328
}
3429

@@ -63,7 +58,6 @@ export function adaptSnippet(
6358
const formattedHit = hit._formatted
6459
const newHit = hit._formatted
6560

66-
// console.log({ attributes })
6761
if (attributes === undefined) {
6862
return hit
6963
}

0 commit comments

Comments
 (0)