Skip to content

Commit

Permalink
bugfix: highlightstrategy is now correctly present in URL params such…
Browse files Browse the repository at this point in the history
… that it's sticky
  • Loading branch information
skeptrunedev authored and densumesh committed Jul 29, 2024
1 parent 0403adb commit 5c24558
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontends/search/src/components/ResultsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const ResultsPage = (props: ResultsPageProps) => {
page_size: props.search.debounced.pageSize ?? 10,
get_total_pages: props.search.debounced.getTotalPages ?? false,
highlight_results: props.search.debounced.highlightResults ?? true,
highlight_strategy: props.search.debounced.highlightStrategy ?? false,
highlight_strategy: props.search.debounced.highlightStrategy ?? "v1",
highlight_threshold: props.search.debounced.highlightThreshold,
highlight_delimiters: props.search.debounced.highlightDelimiters ?? [
"?",
Expand Down
2 changes: 1 addition & 1 deletion frontends/search/src/components/SearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -853,9 +853,9 @@ const SearchForm = (props: { search: SearchStore; groupID?: string }) => {
},
pageSize: 10,
getTotalPages: false,
highlightStrategy: "v1",
highlightResults: true,
highlightDelimiters: ["?", ".", "!"],
highlightStrategy: "v1",
highlightMaxLength: 8,
highlightMaxNum: 3,
highlightWindow: 0,
Expand Down
1 change: 1 addition & 0 deletions frontends/search/src/hooks/useSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const fromStateToParams = (state: SearchOptions): Params => {
sort_by: JSON.stringify(state.sort_by),
pageSize: state.pageSize.toString(),
getTotalPages: state.getTotalPages.toString(),
highlightStrategy: state.highlightStrategy,
highlightResults: state.highlightResults.toString(),
highlightThreshold: state.highlightThreshold.toString(),
highlightDelimiters: state.highlightDelimiters.join(","),
Expand Down

0 comments on commit 5c24558

Please sign in to comment.