File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,12 @@ def format_proxy(proxy, collection):
185
185
log .warning ("Tried to index an abstract-typed entity: %r" , proxy )
186
186
return None
187
187
188
+ # FIXME
189
+ # a hack to display text previews in search for `Pages` `bodyText` property
190
+ # will be removed again in `views.serializers.EntitySerializer` to reduce
191
+ # api response size
192
+ if proxy .schema .name == "Pages" :
193
+ proxy .add ("bodyText" , " " .join (proxy .get ("indexText" )))
188
194
data = proxy .to_full_dict (matchable = True )
189
195
data ["schemata" ] = list (proxy .schema .names )
190
196
data ["caption" ] = proxy .caption
Original file line number Diff line number Diff line change @@ -200,6 +200,13 @@ def collect(self, obj):
200
200
201
201
def _serialize (self , obj ):
202
202
proxy = model .get_proxy (dict (obj ))
203
+ # FIXME
204
+ # a hack to display text previews in search for `Pages` `bodyText` property
205
+ # will be removed again in `views.serializers.EntitySerializer` to reduce
206
+ # api response size
207
+ if proxy .schema .name == "Pages" :
208
+ proxy .pop ("bodyText" )
209
+
203
210
properties = {}
204
211
for prop , value in proxy .itervalues ():
205
212
properties .setdefault (prop .name , [])
You can’t perform that action at this time.
0 commit comments