You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have successfully used the association field to embed content type taxonomies (videos, photo galleries) of which there are a few thousand entries - search results are quite snappy and provide pleasant UX.
However, using the association field to embed articles inside other articles (of which there are 30-60k+ per site), the search feature returns undesirable results 9 times out of 10. My guess is that the search field is perhaps trying to compare keywords to the body content of every article in the 30k+ entries, rather than just the titles? I could be wrong in that assumption.
The search lags very intensely for articles, where the bulk of the time it returns segmented iterations of results, none of which have any relation to the query.
Undesired current article block search
Working example with Video Block
Although videos often have body text as well (much less than articles) the search works just fine
However, while still quite slow for the articles...
This specific query was found to return some expected results
As does the video block
Desired outcome
I'm looking for a way to have the search feature strictly compare to the post taxonomy (our articles) title content, and return relevant results. Could I perhaps specify something in the association query to compare the search query to ONLY the post title?
Block::make(__('Video Embed'))
->add_fields(array(
Field::make('html', 'video_information_text')
->set_html('<h2>Video Embed</h2><p><span style="color: red">Please note:</span> The video has to be published to the sites that this article is published to for the video to show up in the article</p>'),
Field::make('association', 'gnl_video_embed', __('Video'))
->set_types(array(
array(
'type' => 'post',
'post_type' => 'gnl_videos',
)
))
->set_min(1)
->set_max(1)
))
->set_category('gnl_blocks', __('Blocks by <Company Name>'), '')
->set_icon('video-alt2')
->set_preview_mode(true)
->set_render_callback(function ($video_block) { ... });
...
Article Block
Block::make(__('Article Embed'))
->add_fields(array(
Field::make('html', 'article_information_text')
->set_html('<h2>Article Embed</h2><p><span style="color: red">Please note:</span> The embedded article has to be published to the sites that this post is published to for the embedded article to show up in this post</p>'),
Field::make('association', 'gnl_article_embed', __('Article'))
->set_types(array(
array(
'type' => 'post',
'post_type' => 'post',
),
))
->set_min(1)
->set_max(1)
))
->set_category('gnl_blocks', __('Blocks by <Company Name>'), '')
->set_icon('media-document')
->set_preview_mode(true)
->set_render_callback(function ($article_block) { ... });
...
The text was updated successfully, but these errors were encountered:
Context
We have successfully used the
association
field to embed content type taxonomies (videos, photo galleries) of which there are a few thousand entries - search results are quite snappy and provide pleasant UX.However, using the
association
field to embed articles inside other articles (of which there are 30-60k+ per site), the search feature returns undesirable results 9 times out of 10. My guess is that the search field is perhaps trying to compare keywords to the body content of every article in the 30k+ entries, rather than just the titles? I could be wrong in that assumption.The search lags very intensely for articles, where the bulk of the time it returns segmented iterations of results, none of which have any relation to the query.
Undesired current article block search
Working example with Video Block
Although videos often have body text as well (much less than articles) the search works just fine
However, while still quite slow for the articles...
This specific query was found to return some expected results
As does the video block
Desired outcome
I'm looking for a way to have the search feature strictly compare to the
post
taxonomy (our articles) title content, and return relevant results. Could I perhaps specify something in the association query to compare the search query to ONLY the post title?Currently...
Respective code
Video Block
Article Block
The text was updated successfully, but these errors were encountered: