“Galaxy master” results
-
Hi, i’d like to get the post datas only from the solr index. Almost everything works fine, my index is perfect and there are results in the WPSOLR_Query, but i got stuck :S
In the wpsolr-abstract-search-client.php’s get_posts_from_pids() function the $this->results parameter is not ok.
ORIGINAL CODE:
// Create pseudo posts from Solr results $results = [ 'posts' => [], 'documents' => [] ]; foreach ( $this->results as $document ) { ...
SHOULD BE:
// Create pseudo posts from Solr results $results = [ 'posts' => [], 'documents' => [] ]; foreach ( $this->results->get_results() as $document ) { ...
Ater this i would use the WpSolrFilters::WPSOLR_ACTION_POSTS_RESULTS action’s two parameter to fill the empty posts with data – almost empty: ID is isset (xyblogname_xyid). Or instead of this should i just use the WpSolrFilters::WPSOLR_ACTION_POSTS_RESULTS?
If i use the WpSolrFilters::WPSOLR_ACTION_POSTS_RESULTS action, the is_galaxy_master logic seems to be unnecessary.
I think something is missing here, maybe this “Create pseudo posts from Solr results” part of the code should be improved (+some filter / action to build the post with the data we received).
Or did i miss something?
- The topic ‘“Galaxy master” results’ is closed to new replies.