Closed kevinfodness closed 7 months ago
@kevinfodness Correct me if I'm wrong, but is this happening even when it is not a search query?
Since the bulk task uses a regular WP_Query
, I'd expect es not be used, unless some of those plugins would be activating it. No?!
For example, I have one client site that uses SearchPress and the bulk task is not using ES at all.
It's probably not happening when it's not a search query. However, one of the benefits to this library is that you can use a search query performantly to identify posts that (for example) have particular text in the post body, at which point it gets picked up by the search integration with Elasticsearch, which may not return the expected results. This happened for me when using VIP Enterprise Search and would likely happen with ElasticPress itself as well. SearchPress may be smart enough to not interject itself in this type of query.
I still need to confirm if SearchPress provides a similar hook. A quick look indicates it doesn't, but I'll need to check.
I reviewed the SearchPress code and it only integrates with the main query. So we are good to resolve this issue.
Elasticsearch integrations cause the database
WHERE
clause pagination by post ID to fail, resulting in an infinite loop. Consider disabling common Elasticsearch integrations by default:There is a note in the wiki about how to work around this for now: https://github.com/alleyinteractive/wp-bulk-task/wiki#elasticsearch