1
0
Fork 0
docsearch/docs/src/how-do-we-build-an-index.md
Sylvain Pace 25f7214830
Docs/update (#641)
* fixing typo

* keeping same convention

* avoid wrong use of word crawling

* removing superfluous comment

* make the documentation more explicit to prevent error in the key usage, introduces feedback from algolia/docsearch-scraper#438, give instruction about how to use the headless chrome

* add synonym, resolves #640

* precise sitemap

* fix typos

* removing unavailable anchor

* fixing wrong URL

* resolves #518 by removing unwanted char from anchors

* fixing linter issues

* fix remark-lint warning
2019-03-28 14:32:31 +01:00

1.9 KiB

layout title
two-columns How do we build a DocSearch index?

In this section you will learn how we build a DocSearch index from your page.

Everything starts from your page

1st step {mt-2}

We extract the payload thanks to your set of selectors

2nd step {mt-2}

We will focus on the highlighted information depending on your selectors.

We iterate through the HTML flow and build the payload

3rd step {mt-2}

This payload will be the only data extracted from your page.

We iterate through the payload and start pushing records

4th step {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

5th step {mt-2}

Base on the position within the flow, we nest elements as much as possible to keep the context and incerease the relevancy.

We iterate until we match a text element

6th step {mt-2}

We override the text element when we find a newer one

7th step {mt-2}

We remove the stashed, deeper elements when we add a higher level

8th step {mt-2}

Contextual information and hierarchy must be updated once we encounter a new level. We are doing that because it highlights a new sub-section not related to the previous one.

If you need any further information, please do not hesitate, send us your feedback.