@@ -286,7 +286,14 @@ public function export( bool $register = false, $parent = null ) : ?array {
286286 if ( $ this ->get_is_user () ) {
287287 switch ( $ filter ['filter ' ] ) {
288288 case 'redipress/schema_fields ' :
289- $ filter ['filter ' ] = 'redipress/user_schema_fields ' ;
289+ $ filter ['filter ' ] = 'redipress/index/users/schema_fields ' ;
290+ break ;
291+ }
292+ }
293+ else {
294+ switch ( $ filter ['filter ' ] ) {
295+ case 'redipress/schema_fields ' :
296+ $ filter ['filter ' ] = 'redipress/index/posts/schema_fields ' ;
290297 break ;
291298 }
292299 }
@@ -873,7 +880,7 @@ private function redipress_add_queryable_internal() {
873880 }
874881
875882 if ( strpos ( $ post_id , 'block_ ' ) !== false &&
876- ! ( $ post_id = \Geniem \RediPress \Index \Index ::indexing () ) // phpcs:ignore
883+ ! ( $ post_id = \Geniem \RediPress \Index \PostIndex ::indexing () ) // phpcs:ignore
877884 ) {
878885 $ document_uri = filter_input ( INPUT_SERVER , 'DOCUMENT_URI ' , \FILTER_SANITIZE_STRING );
879886
@@ -914,7 +921,7 @@ private function redipress_add_queryable_internal() {
914921 $ users = true ;
915922 }
916923 elseif ( is_numeric ( $ post_id ) ) {
917- $ doc_id = \Geniem \RediPress \Index \Index ::get_document_id ( get_post ( $ post_id ) );
924+ $ doc_id = \Geniem \RediPress \Index \PostIndex ::get_document_id ( get_post ( $ post_id ) );
918925 }
919926 elseif ( strpos ( $ post_id , 'block_ ' ) !== false ) {
920927 if ( ! ( $ post_id = \Geniem \RediPress \Index \Index::indexing () ) ) {
@@ -923,7 +930,7 @@ private function redipress_add_queryable_internal() {
923930 $ post_id = basename ( $ document_uri );
924931 }
925932
926- $ doc_id = \Geniem \RediPress \Index \Index ::get_document_id ( get_post ( $ post_id ) );
933+ $ doc_id = \Geniem \RediPress \Index \PostIndex ::get_document_id ( get_post ( $ post_id ) );
927934 }
928935
929936 if ( ! empty ( $ doc_id ) ) {
@@ -955,6 +962,7 @@ private function redipress_add_queryable_internal() {
955962 ];
956963
957964 $ this ->filters ['redipress_schema_fields ' ] = [
965+ // This gets changed to the proper filter in the export method.
958966 'filter ' => 'redipress/schema_fields ' ,
959967 'function ' => function ( $ fields ) {
960968
0 commit comments