Skip to content

Commit 5305458

Browse files
committed
add _ with variables
1 parent 0817d43 commit 5305458

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

readthedocs/search/faceted_search.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ class PageSearchBase(RTDFacetedSearch):
101101
doc_types = [PageDocument]
102102
index = PageDocument._doc_type.index
103103

104-
outer_fields = ['title']
105-
section_fields = ['sections.title', 'sections.content']
106-
domain_fields = [
104+
_outer_fields = ['title']
105+
_section_fields = ['sections.title', 'sections.content']
106+
_domain_fields = [
107107
'domains.type_display',
108108
'domains.name',
109109
'domains.display_name',
110110
]
111-
fields = outer_fields
111+
fields = _outer_fields
112112

113113
# need to search for both 'and' and 'or' operations
114114
# the score of and should be higher as it satisfies both or and and
@@ -125,7 +125,7 @@ def query(self, search, query):
125125
sections_nested_query = self.generate_nested_query(
126126
query=query,
127127
path='sections',
128-
fields=self.section_fields,
128+
fields=self._section_fields,
129129
inner_hits={
130130
'highlight': {
131131
'number_of_fragments': 1,
@@ -141,7 +141,7 @@ def query(self, search, query):
141141
domains_nested_query = self.generate_nested_query(
142142
query=query,
143143
path='domains',
144-
fields=self.domain_fields,
144+
fields=self._domain_fields,
145145
inner_hits={
146146
'highlight': {
147147
'number_of_fragments': 1,

0 commit comments

Comments
 (0)