Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Replacing Algolia search with Elasticsearch #24559

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions docs/assets/scss/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,14 @@ body.td-searchpage {
color: #fff;
}

.algolia-data {
.search-output {
padding: 0;
position: relative;
}

#doc-hit {
padding-left: 0;

/*
@media(max-width: 991px) and (min-width: 768px) {
justify-content: center;
}
@media(max-width: 599px) {
justify-content: center;
}
*/
li {
min-width: 280px;

Expand Down Expand Up @@ -328,13 +320,6 @@ body.td-searchpage {

body.td-searchpage .td-content {
position: relative;

.search-by-algolia {
position: absolute;
right: 0;
top: 6px;
width: 200px;
}
}

.search-area {
Expand Down Expand Up @@ -366,22 +351,9 @@ body.td-searchpage .td-content {
}
}

@media (max-width: 991px) {
body.td-searchpage .td-content {
.search-by-algolia {
width: 150px;
}
}
}

@media (max-width: 480px) {
body.td-searchpage .td-content {
padding-top: 40px;

.search-by-algolia {
width: 120px;
top: 0;
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions docs/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ version_menu = "Releases"
version_menu_pagelinks = true

[search]
algolia_docsearch = true
algolia_sequence_expressions = true
elastic_search = true

[path_base_for_github_subdir]
from = "content/en/(.*?)/"
Expand Down
5 changes: 1 addition & 4 deletions docs/content/search.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
---
title: Search results
linkTitle: Search results
description: Search results powered with Algolia. Quickly find articles that you are looking for.
description: Search results powered with Elasticsearch. Quickly find articles that you are looking for.
type: searchpage
---

<div class="search-by-algolia">
<img src="/images/search-by-algolia.svg" />
</div>
<div class="search-results-container" id="search-results"></div>

<br>
4 changes: 2 additions & 2 deletions docs/layouts/partials/hooks/body-end.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
}
</script>

{{- if .Site.Params.search.algolia_docsearch -}}
<script src="/js/search.js" id="algolia-search-script"{{- if .Site.Params.search.algolia_sequence_expressions }} data-sequence-expressions="true"{{- end }}></script>
{{- if .Site.Params.search.elastic_search -}}
<script src="/js/search.js" id="elastic-search-script"></script>
{{- end -}}

{{- if .Site.Params.kapa_ai -}}
Expand Down
4 changes: 2 additions & 2 deletions docs/layouts/partials/search-input.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{ if .Site.Params.search.algolia_docsearch -}}
{{ if .Site.Params.search.elastic_search -}}
<div class="search-area">
<i class="search-icon"></i>
<input type="search" id="search-query" name="query" class="td-search-input" placeholder="Search documentation" aria-label="Search documentation"
autocomplete="off">
<div class="reset-input"></div>
{{ if ne .Type "searchpage" }}
<div class="search-result" style="display:none">
<div class="algolia-data" id="docs">
<div class="search-output" id="docs">
<ul id="doc-hit" class="content-panel"></ul>
<div id="pagination-docs" class="pager"></div>
</div>
Expand Down
9 changes: 1 addition & 8 deletions docs/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1385,10 +1385,7 @@
https://raw.githubusercontent.com/
https://sessions.bugsnag.com/
https://stats.g.doubleclick.net/
https://umbcujcbe8-1.algolianet.com/
https://umbcujcbe8-2.algolianet.com/
https://umbcujcbe8-3.algolianet.com/
https://umbcujcbe8-dsn.algolia.net/
https://80f647c7c1f545fc97ff43f8b602dc86.us-west-2.aws.found.io
https://www.google-analytics.com/
https://www.yugabyte.com
https://yugabyteklhgka.dataplane.rudderstack.com/v1/page
Expand All @@ -1408,10 +1405,6 @@
https://metrics.kapa.ai/
https://netlify-cdp-loader.netlify.app/
https://netlify-rum.netlify.app
https://umbcujcbe8-1.algolianet.com/
https://umbcujcbe8-2.algolianet.com/
https://umbcujcbe8-3.algolianet.com/
https://umbcujcbe8-dsn.algolia.net/
https://widget.kapa.ai/kapa-widget.bundle.js
https://www.google-analytics.com/
https://www.google.com/recaptcha/
Expand Down
Loading