-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Index more domain data into elasticsearch #5979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 22 commits
7b3d3c3
f1f522b
20777cb
d97738f
c00575e
e3a65dc
f57afe1
7a5e387
9362b64
3255f84
bd53562
fcbb2d0
b6221c6
5f186e7
301b2af
9e2d497
597a59b
849ba4d
6501e7c
8e0fe5b
8bb25b9
8cc8999
090f187
d456bf0
5c74690
17c88aa
28ec7aa
2081269
2fe0d0a
6a9db48
e61fd36
b597da9
5c3f71b
7d1ed0c
9c9f03f
4beee77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,6 @@ class PageDocument(RTDDocTypeMixin, DocType): | |
# Metadata | ||
project = fields.KeywordField(attr='project.slug') | ||
version = fields.KeywordField(attr='version.slug') | ||
path = fields.KeywordField(attr='processed_json.path') | ||
dojutsu-user marked this conversation as resolved.
Show resolved
Hide resolved
|
||
full_path = fields.KeywordField(attr='path') | ||
|
||
# Searchable content | ||
|
@@ -88,17 +87,14 @@ class PageDocument(RTDDocTypeMixin, DocType): | |
'role_name': fields.KeywordField(), | ||
|
||
# For linking to the URL | ||
'doc_name': fields.KeywordField(), | ||
'anchor': fields.KeywordField(), | ||
|
||
# For showing in the search result | ||
'type_display': fields.TextField(), | ||
'doc_display': fields.TextField(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we removing this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😕 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, sure. They are showing the same information. I believe the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both are quite readable: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ericholscher |
||
'docstrings': fields.TextField(), | ||
|
||
# Simple analyzer breaks on `.`, | ||
# otherwise search results are too strict for this use case | ||
'name': fields.TextField(analyzer='simple'), | ||
'display_name': fields.TextField(analyzer='simple'), | ||
} | ||
) | ||
|
||
|
@@ -122,12 +118,9 @@ def prepare_domains(self, html_file): | |
all_domains = [ | ||
{ | ||
'role_name': domain.role_name, | ||
'doc_name': domain.doc_name, | ||
'anchor': domain.anchor, | ||
'type_display': domain.type_display, | ||
'doc_display': domain.doc_display, | ||
'docstrings': html_file.processed_json.get('domain_data', {}).get(domain.anchor, ''), | ||
'name': domain.name, | ||
'display_name': domain.display_name if domain.display_name != '-' else '', | ||
} | ||
for domain in domains_qs | ||
] | ||
|
Uh oh!
There was an error while loading. Please reload this page.