1
0
Fork 0

Merge branch 'doc/update_content'

This commit is contained in:
Sylvain Pace 2018-09-04 09:43:56 +02:00
commit e34da808a6
10 changed files with 11 additions and 8 deletions

View file

@ -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",

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

View file

@ -7,7 +7,7 @@ In this section you will learn how we build a DocSearch index from your page.
### Everything starts from your page
<img src="./assets/how_do_we_build_docsearch_index_1.png" alt="1st step" class="mt-2"/>
<img src="./assets/build_index/how_do_we_build_docsearch_index_1.png" alt="1st step" class="mt-2"/>
_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`
<img src="./assets/how_do_we_build_docsearch_index_2.png" alt="2nd step" class="mt-2"/>
<img src="./assets/build_index/how_do_we_build_docsearch_index_2.png" alt="2nd step" class="mt-2"/>
We will focus on the highlighted information depending on your selectors.
### We iterate though the HTML flow and build the payload
<img src="./assets/how_do_we_build_docsearch_index_3.png" alt="3rd step" class="mt-2"/>
<img src="./assets/build_index/how_do_we_build_docsearch_index_3.png" alt="3rd step" class="mt-2"/>
This payload will be the only data extracted from your page.
### We iterate though the payload and start pushing records
<img src="./assets/how_do_we_build_docsearch_index_4.png" alt="4th step" class="mt-2"/>
<img src="./assets/build_index/how_do_we_build_docsearch_index_4.png" alt="4th step" class="mt-2"/>
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
<img src="./assets/how_do_we_build_docsearch_index_5.png" alt="5th step" class="mt-2"/>
<img src="./assets/build_index/how_do_we_build_docsearch_index_5.png" alt="5th step" class="mt-2"/>
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
<img src="./assets/how_do_we_build_docsearch_index_6.png" alt="6th step" class="mt-2"/>
<img src="./assets/build_index/how_do_we_build_docsearch_index_6.png" alt="6th step" class="mt-2"/>
### We override the text element when we find a newer one
<img src="./assets/how_do_we_build_docsearch_index_7.png" alt="7th step" class="mt-2"/>
<img src="./assets/build_index/how_do_we_build_docsearch_index_7.png" alt="7th step" class="mt-2"/>
### We remove the stashed, deeper elements when we add a higher level
<img src="./assets/how_do_we_build_docsearch_index_7.png" alt="7th step" class="mt-2"/>
<img src="./assets/build_index/how_do_we_build_docsearch_index_7.png" alt="7th step" class="mt-2"/>
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.