We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a70b20 commit f24ade2Copy full SHA for f24ade2
_elastic/indexer.py
@@ -26,9 +26,11 @@ def build_documents(version, build_folder):
26
soup = BeautifulSoup(html, 'html.parser')
27
h1_elements = [a.get_text() for a in soup.find_all("h1")]
28
h2_elements = [a.get_text() for a in soup.find_all("h2")]
29
+ h3_elements = [a.get_text() for a in soup.find_all("h3")]
30
31
element = {"version": version, "title": title, "parent_title": parent_title,
- "slug": slug, "html": html, "h1": h1_elements, "h2": h2_elements}
32
+ "slug": slug, "html": html, "h1": h1_elements, "h2": h2_elements,
33
+ "h3": h3_elements}
34
yield element
35
36
@@ -79,7 +81,10 @@ def create_index(self):
79
81
"title" : { "type" : "text" },
80
82
"parent_title" : { "type" : "text" },
83
"version": {"type": "text"},
- "url" : { "type" : "text" }
84
+ "url" : { "type" : "text" },
85
+ "h1" : { "type" : "text" },
86
+ "h2" : { "type" : "text" },
87
+ "h3" : { "type" : "text" }
88
}
89
90
0 commit comments