-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related Posts not work #3901
Comments
@rstrah, Also, using the debugging add-on, if you visit the page where the "No related posts found" message is displayed, you should be able to debug the query being sent to ElasticPress. When you get that, feel free to share it here if you want. |
@felipeelia Hi.
Like that ) |
|
It has been 3 days since more information was requested from you in this issue and we have not heard back. This issue is now marked as stale and will be closed in 3 days, but if you have more information to add then please comment and the issue will stay open. |
i have problem |
@rstrah the query is going through, but not finding anything related. This is the Elasticsearch query: {
"from": 0,
"size": 5,
"post_filter": {
"bool": {
"must": [
{
"terms": {
"post_type.raw": [
"post"
]
}
},
{
"terms": {
"post_status": [
"publish"
]
}
}
]
}
},
"query": {
"more_like_this": {
"like": {
"_id": 1236992
},
"fields": [
"post_title",
"post_content",
"terms.post_tag.name"
],
"min_term_freq": 1,
"max_query_terms": 12,
"min_doc_freq": 1
}
},
"sort": [
{
"post_date": {
"order": "desc"
}
}
]
} You will need to make sure your content is properly indexed, and that you have content in the "post" post_type with similar title, content, and/or tags of the post with ID 1236992. If you need to use different fields, you'll need to use the add_filter(
'ep_related_posts_fields',
function( $fields ) {
$fields = array_merge(
$fields,
[ 'post_content_filtered', 'terms.category.name' ]
);
return $fields;
}
); (more options are available in this gist.) |
It has been 3 days since more information was requested from you in this issue and we have not heard back. This issue is now marked as stale and will be closed in 3 days, but if you have more information to add then please comment and the issue will stay open. |
This issue has been automatically closed because there has been no response to our request for more information in the past 3 days. With only the information that is currently available, we are unable to take further action on this ticket. Please reach out if you have found or find the answer we need so that we can investigate further. When the information is ready, you can re-open this ticket to share it with us. |
Describe your question
I have function:
I get "No related posts found"
I call it like this (I'm sure the $id being passed is not empty)
ep_get_related_posts($id, $related_post_count = 5)
Through the block in Gutenberg I get the same thing(If you use your block).
Code of Conduct
The text was updated successfully, but these errors were encountered: