Skip to content

Commit f057cbc

Browse files
authored
Docs (dev): fix server side search (#8845)
Fixed some casing issues, and made the build dir play nice with both docsets (so we can now build each docset independently). Closes #8844
1 parent d9a91e9 commit f057cbc

File tree

5 files changed

+10
-15
lines changed

5 files changed

+10
-15
lines changed

docs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
SPHINXOPTS =
66
SPHINXBUILD = sphinx-build
77
PAPER =
8-
BUILDDIR = _build
8+
BUILDDIR = _build/$(RTD_DOCSET)
99

1010
# Do not use local Django settings during the docs build
1111
export DJANGO_SETTINGS_SKIP_LOCAL = True

docs/dev/design/in-doc-search-ui.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Existing Search Implementation
4949

5050
We have a detailed documentation explaining the underlying architecture of our search backend
5151
and how we index documents to our Elasticsearch index.
52-
You can read about it :doc:`here <../search>`.
52+
You can read about it :doc:`here </server-side-search>`.
5353

5454

5555
Proposed Architecture for In-Doc Search UI

docs/dev/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ or taking the open source Read the Docs codebase for your own custom installatio
2323
docs
2424
front-end
2525
i18n
26-
search
26+
server-side-search
2727
search-integration
2828
settings
2929
tests

docs/dev/search.rst renamed to docs/dev/server-side-search.rst

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
Search
2-
======
1+
Server Side Search
2+
==================
33

44
Read The Docs uses Elasticsearch_ instead of the built in Sphinx search for providing better search
55
results. Documents are indexed in the Elasticsearch index and the search is made through the API.
66
All the Search Code is open source and lives in the `GitHub Repository`_.
77
Currently we are using `Elasticsearch 6.3`_.
88

9-
Local Development Configuration
9+
Local development configuration
1010
-------------------------------
1111

1212
Elasticsearch is installed and run as part of the :doc:`development installation guide </install>`.
@@ -24,7 +24,7 @@ management command:
2424
For performance optimization, we implemented our own version of management command rather than
2525
the built in management command provided by the `django-elasticsearch-dsl`_ package.
2626

27-
Auto Indexing
27+
Auto indexing
2828
^^^^^^^^^^^^^
2929

3030
By default, Auto Indexing is turned off in development mode. To turn it on, change the
@@ -57,16 +57,12 @@ If you get an error like::
5757

5858
RequestError(400, 'search_phase_execution_exception', 'failed to create query: ...
5959

60-
You can fix this by deleting the page index:
60+
You can fix this by deleting the page index and :ref:`re-indexing <server-side-search:indexing into elasticsearch>`:
6161

6262
.. prompt:: bash
6363

6464
inv docker.manage 'search_index --delete'
65-
66-
.. note::
67-
68-
You'll need to :ref:`reindex the projects <search:indexing into elasticsearch>` after this.
69-
65+
inv docker.manage reindex_elasticsearch
7066

7167
How we index documentations
7268
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -93,7 +89,7 @@ from the main site. We listen to the `post_create` and `post_delete` signals of
9389
`Project` model and index/delete into Elasticsearch accordingly.
9490

9591

96-
Elasticsearch Document
92+
Elasticsearch document
9793
~~~~~~~~~~~~~~~~~~~~~~
9894

9995
`elasticsearch-dsl`_ provides a model-like wrapper for `the Elasticsearch document`_.

tox.ini

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ deps =
4343
setenv =
4444
RTD_DOCSET=dev
4545
commands =
46-
pip install -r{toxinidir}/requirements/docs.txt # TODO: Remove this once our Sphinx versions don't conflict
4746
sphinx-build -W --keep-going -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
4847

4948
[testenv:docs-linkcheck]

0 commit comments

Comments
 (0)