@@ -2,11 +2,12 @@ Searching with Read the Docs
2
2
============================
3
3
4
4
Read the Docs uses Elasticsearch to provide a better search experience.
5
- This guide is intended to show that how to add "search as you type" feature to your documentation,
6
- how to use advanced query syntax to get more accurate results and
7
- many other search features that Read the Docs supports with example searches.
5
+ This guide explains how to add a "search as you type" feature to your documentation,
6
+ how to use advanced query syntax to get more accurate results,
7
+ and how to use other search features that Read the Docs supports.
8
+ Where appropriate, example searches are provided.
8
9
9
- You can find information on the search architecture and how we index document on our
10
+ You can find information on the search architecture and how we index document in our
10
11
:doc: `Search <../development/search >` docs.
11
12
12
13
@@ -19,16 +20,13 @@ You can find information on the search architecture and how we index document on
19
20
Improvements over Sphinx search
20
21
-------------------------------
21
22
22
- Sphinx is designed to create a self-contained webpage and
23
- all search indexing is done when the documentation is built.
24
- As a result, it would be impossible for Sphinx to add features like searching translations
25
- or subprojects or having analytics on common searches.
26
- Read the Docs supports a powerful documentation search unlike
27
- Sphinx which only have a basic search support.
23
+ Sphinx is designed to create a self-contained webpage and all search indexing is performed at the time when the documentation is built.
24
+ This means that it is not possible for Sphinx to add features such as searching translations or subprojects or providing analytics on common searches.
25
+ Read the Docs supports a powerful documentation search, unlike Sphinx, which has support only for a basic search function.
28
26
29
27
Features of Read the Docs documentation search are:
30
28
31
- - Search as you type feature supported.
29
+ - Search-as- you- type feature supported.
32
30
- Search analytics.
33
31
- Search across multiple projects.
34
32
- Search inside subprojects.
@@ -46,12 +44,12 @@ Search features for project admins
46
44
Enable "search as you type" in your documentation
47
45
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
46
49
- `readthedocs-sphinx-search `_ is a Sphinx extension which integrates your
50
- documentation more closely with Read the Docs' search implementation.
51
- It adds a clean and minimal full page search UI which supports **search as you type ** feature.
47
+ `readthedocs-sphinx-search `_ is a Sphinx extension that integrates your
48
+ documentation more closely with the search implementation of Read the Docs .
49
+ It adds a clean and minimal full- page search UI that supports a **search as you type ** feature.
52
50
53
- To get a glimpse of it, you can press :guilabel: ` / ` (forward slash) and start typing
54
- or just visit these URLs:
51
+ To try this feature,
52
+ you can press :guilabel: ` / ` (forward slash) and start typing or just visit these URLs:
55
53
56
54
- https://docs.readthedocs.io/?rtd_search=contributing
57
55
- https://docs.readthedocs.io/?rtd_search=api/v3/projects/
@@ -60,16 +58,16 @@ or just visit these URLs:
60
58
Search analytics
61
59
~~~~~~~~~~~~~~~~
62
60
63
- Search queries are recorded and are stored in database to provide valuable analytics to the project admins.
64
- These analytics makes it easy to know what your users are looking for in your documentation.
61
+ Search queries are recorded and stored in a database in order to provide analytics to the project admins.
62
+ These analytics make it easy to know what your users are looking for in your documentation.
65
63
You can see these analytics in your project admin dashboard.
66
64
67
65
.. note ::
68
66
69
- Currently, this feature is in beta state and is available under a
67
+ Currently, this feature is in beta and is available under a
70
68
:ref: `feature flag <guides/feature-flags:Available Flags >`.
71
69
We plan to make this available for everyone soon.
72
- If you want to test this feature out and help giving us feedback,
70
+ If you want to test this feature and help the project by providing feedback,
73
71
please contact us via `GitHub issues `_.
74
72
75
73
.. figure :: /_static/images/guides/search-analytics-demo.png
@@ -86,8 +84,7 @@ Search features for readers
86
84
Search across all projects
87
85
~~~~~~~~~~~~~~~~~~~~~~~~~~
88
86
89
- Our `main site search `_ supports searching for projects and
90
- searching across all projects.
87
+ Our `main site search `_ supports searching for projects and searching across all projects.
91
88
You can also use it to select the specific project and version to narrow down the search results.
92
89
93
90
Example queries:
@@ -101,27 +98,25 @@ Example queries:
101
98
Search inside subprojects
102
99
~~~~~~~~~~~~~~~~~~~~~~~~~
103
100
104
- We allow projects to configured as subprojects of another project.
101
+ We allow projects to be configured as subprojects of another project.
105
102
You can read more about this in our :doc: `Subprojects <../subprojects >` documentation.
106
103
107
- If a search is made in a project which have one or more subprojects under it,
108
- the search results then also includes the results from subprojects because
109
- they share a search index with their parent and sibling projects.
110
- For example: `Kombu `_ is one of the subprojects of `Celery `_,
111
- so if you search in Celery docs, then the results from Kombu will also be there.
104
+ If a search is made in a project which has one or more subprojects under it,
105
+ the search results include the results from those subprojects: projects share search indexes with their parent- and sibling-projects.
106
+ For example: If `Kombu `_ is a subproject of `Celery `_ and you search in Celery docs, then the results from Kombu will also be there.
112
107
Example: https://docs.celeryproject.org/en/master/search.html?q=utilities&check_keywords=yes&area=default
113
108
114
109
115
110
Search query syntax
116
111
~~~~~~~~~~~~~~~~~~~
117
112
118
- Read the Docs uses `Simple Query String `_ feature of `Elasticsearch `_,
119
- hence the search query can be made complex to get more accurate results .
113
+ Read the Docs uses the `Simple Query String `_ feature of `Elasticsearch `_.
114
+ This means that as the search query becomes more complex, the results yielded become more specific .
120
115
121
116
Exact phrase search
122
117
+++++++++++++++++++
123
118
124
- If a query is wrapped in ``" ``,
119
+ If a query is wrapped in ``" `` (double quotes) ,
125
120
then only those results where the phrase is exactly matched will be returned.
126
121
127
122
Example queries:
@@ -133,8 +128,8 @@ Example queries:
133
128
Exact phrase search with slop value
134
129
+++++++++++++++++++++++++++++++++++
135
130
136
- ``~N `` after a phrase signifies slop amount.
137
- It can be used to match words which are near one another.
131
+ ``~N `` (tilde N) after a phrase signifies slop amount.
132
+ It can be used to match words that are near one another.
138
133
139
134
Example queries:
140
135
@@ -145,7 +140,7 @@ Example queries:
145
140
Prefix query
146
141
++++++++++++
147
142
148
- ``* `` at the end of any term signifies a prefix query.
143
+ ``* `` (asterisk) at the end of any term signifies a prefix query.
149
144
It returns the results containg the words with specific prefix.
150
145
151
146
Example queries:
@@ -158,9 +153,8 @@ Fuzzy query
158
153
+++++++++++
159
154
160
155
``~N `` after a word signifies edit distance (fuzziness).
161
- This type of query is helpful when spelling of the actual keyword is unsure.
162
- It returns results that contain terms similar to the search term,
163
- as measured by a `Levenshtein edit distance `_.
156
+ This type of query is helpful when the exact spelling of the keyword is unknown.
157
+ It returns results that contain terms similar to the search term as measured by a `Levenshtein edit distance `_.
164
158
165
159
Example queries:
166
160
@@ -172,8 +166,7 @@ Example queries:
172
166
Using the search query syntax to build complex queries
173
167
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174
168
175
- The search query syntaxes described in the previous section
176
- can be used with one another to build complex queries.
169
+ The search query syntaxes described in the previous section can be used with one another to build complex queries.
177
170
178
171
Example queries:
179
172
0 commit comments