File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -158,13 +158,15 @@ pub fn add_resource(
158158 let writer = appstate. writer . read ( ) ?;
159159
160160 let mut doc = Document :: default ( ) ;
161- let json_obj = serde_json:: from_str ( & resource. to_json ( store) ?) . map_err ( |e| {
162- format ! (
163- "Failed to convert resource to json for search indexing. Subject: {}. Error: {}" ,
164- subject, e
165- )
166- } ) ?;
167- doc. add_json_object ( fields. propvals , json_obj) ;
161+ doc. add_json_object (
162+ fields. propvals ,
163+ serde_json:: from_str ( & resource. to_json_ad ( ) ?) . map_err ( |e| {
164+ format ! (
165+ "Failed to convert resource to json for search indexing. Subject: {}. Error: {}" ,
166+ subject, e
167+ )
168+ } ) ?,
169+ ) ;
168170
169171 doc. add_text ( fields. subject , subject) ;
170172 doc. add_text ( fields. title , get_resource_title ( resource) ) ;
You can’t perform that action at this time.
0 commit comments