diff --git a/docs/config.json b/docs/config.json
index da52a484..10aca1f0 100644
--- a/docs/config.json
+++ b/docs/config.json
@@ -74,6 +74,9 @@
{
"title": "Config Files",
"url": "config-file.html"
+ },{
+ "title": "Build an index",
+ "url": "how-do-we-build-an-index.html"
},
{
"title": "Build An Index",
diff --git a/docs/src/assets/build_index/how_do_we_build_docsearch_index_1.png b/docs/src/assets/build_index/how_do_we_build_docsearch_index_1.png
new file mode 100644
index 00000000..a81a241a
Binary files /dev/null and b/docs/src/assets/build_index/how_do_we_build_docsearch_index_1.png differ
diff --git a/docs/src/assets/build_index/how_do_we_build_docsearch_index_2.png b/docs/src/assets/build_index/how_do_we_build_docsearch_index_2.png
new file mode 100644
index 00000000..d819a116
Binary files /dev/null and b/docs/src/assets/build_index/how_do_we_build_docsearch_index_2.png differ
diff --git a/docs/src/assets/build_index/how_do_we_build_docsearch_index_3.png b/docs/src/assets/build_index/how_do_we_build_docsearch_index_3.png
new file mode 100644
index 00000000..1b7cd031
Binary files /dev/null and b/docs/src/assets/build_index/how_do_we_build_docsearch_index_3.png differ
diff --git a/docs/src/assets/build_index/how_do_we_build_docsearch_index_4.png b/docs/src/assets/build_index/how_do_we_build_docsearch_index_4.png
new file mode 100644
index 00000000..8bde64d4
Binary files /dev/null and b/docs/src/assets/build_index/how_do_we_build_docsearch_index_4.png differ
diff --git a/docs/src/assets/build_index/how_do_we_build_docsearch_index_5.png b/docs/src/assets/build_index/how_do_we_build_docsearch_index_5.png
new file mode 100644
index 00000000..97cf5b34
Binary files /dev/null and b/docs/src/assets/build_index/how_do_we_build_docsearch_index_5.png differ
diff --git a/docs/src/assets/build_index/how_do_we_build_docsearch_index_6.png b/docs/src/assets/build_index/how_do_we_build_docsearch_index_6.png
new file mode 100644
index 00000000..7aa5547a
Binary files /dev/null and b/docs/src/assets/build_index/how_do_we_build_docsearch_index_6.png differ
diff --git a/docs/src/assets/build_index/how_do_we_build_docsearch_index_7.png b/docs/src/assets/build_index/how_do_we_build_docsearch_index_7.png
new file mode 100644
index 00000000..8bea3b10
Binary files /dev/null and b/docs/src/assets/build_index/how_do_we_build_docsearch_index_7.png differ
diff --git a/docs/src/assets/build_index/how_do_we_build_docsearch_index_8.png b/docs/src/assets/build_index/how_do_we_build_docsearch_index_8.png
new file mode 100644
index 00000000..d1a40261
Binary files /dev/null and b/docs/src/assets/build_index/how_do_we_build_docsearch_index_8.png differ
diff --git a/docs/src/how-do-we-build-an-index.md b/docs/src/how-do-we-build-an-index.md
index 3a81814f..2958d47c 100644
--- a/docs/src/how-do-we-build-an-index.md
+++ b/docs/src/how-do-we-build-an-index.md
@@ -7,7 +7,7 @@ In this section you will learn how we build a DocSearch index from your page.
### Everything starts from your page
-
+
_Note: We would rather avoid useless js rendering. All useful information should
be available without any client-side rendering. You can use `curl` in order to
@@ -15,41 +15,41 @@ have a better idea of how it would look without any client-side rendering._
### We extract the payload thanks to your set of `selectors`
-
+
We will focus on the highlighted information depending on your selectors.
### We iterate though the HTML flow and build the payload
-
+
This payload will be the only data extracted from your page.
### We iterate though the payload and start pushing records
-
+
We index the temporary record when we add an element to it (if
`min_indexed_level` is set to `0`)
### We pile up the elements based on the current temporary record
-
+
Base on the position within the flow, we nest elements as much as possble to
keep the contextual relevancy.
### We iterate until we match a `text` element
-
+
### We override the text element when we find a newer one
-
+
### We remove the stashed, deeper elements when we add a higher level
-
+
Contextual information and hierarchy must be updated once we encounter a new
level since it highlights a new sub-section not related to the previous one.