parisholley / wordpress-fantastic-elasticsearch

Improve wordpress search performance/accuracy and enable faceted search by leveraging an ElasticSearch server.
MIT License
162 stars 64 forks source link

Selected but not indexed : fallback to WP search engine? #119

Closed Wardormeur closed 9 years ago

Wardormeur commented 9 years ago

I had a "strange" bug lately in which i had no posts displaying in one of my categories, all were supposed to be indexed & so on (ticked & selected, mb was that the bug :) ). So wasn't one (for some reason?), and getting up to the stream, i found $wp_query->query_vars['post__in'] = empty($results['ids']) ? array(0) : $results['ids']; array(0) implies no display at all, couldnt we just "fall back" to WP engine instead of displaying nothing?

parisholley commented 9 years ago

Nope, because in cases like "search" or other instance, if ES returns no result, it means there is no content. Falling back to WP would result in unexpected behavior. The only time the plugin will fallback is if it can't connect to ES.