Hi @braino ,
Technically it’s possible to have an omni search with the current setup.
How:
This assumes everything is a custom post type or default post type.
That way the Post ID for all posts would be unique. So updating and deleting resources across different post types would be possible.
You can there for name all the post types as the same collection name.
//only necessary if the default post schema is not necessary
function cm_typesense_add_book_schema( $schema, $name ) {
if ( $name == 'book' ) {
$schema = [
'name' => 'book',
'fields' => [
[ 'name' => 'post_content', 'type' => 'string' ],
[ 'name' => 'post_title', 'type' => 'string' ],
[ 'name' => 'post_type', 'type' => 'string' ],
[ 'name' => 'post_author', 'type' => 'string' ],
[ 'name' => 'comment_count', 'type' => 'int64' ],
[ 'name' => 'is_sticky', 'type' => 'int32' ],
[ 'name' => 'post_excerpt', 'type' => 'string' ],
[ 'name' => 'post_date', 'type' => 'string' ],
[ 'name' => 'post_id', 'type' => 'string' ],
[ 'name' => 'post_modified', 'type' => 'string' ],
[ 'name' => 'id', 'type' => 'string' ],
[ 'name' => 'permalink', 'type' => 'string' ],
[ 'name' => 'post_thumbnail', 'type' => 'string' ],
[ 'name' => 'genre', 'type' => 'string[]', 'facet' => true ]
],
'default_sorting_field' => 'comment_count'
];
}
return $schema;
}
add_filter( 'cm_typesense_schema', 'cm_typesense_add_book_schema', 10, 2 );
https://codemanas.github.io/cm-typesense-docs/advanced-custom-post-types/#adding-schema
Some things to remember is to have the same/shared schema for your post types. So that the final result (frontend) looks like how you would like it to.
Currently the plugin in UI/UX is not intuitive enough to allow omnisearch.
We’re working on this – but it’s not the top priority on the development cycle.