Score:0

Search API views is displaying empty pages

kr flag

My search page is displaying results. The pager is displaying. But the first 15 pages display no results and then on the 16th page, I can see the content.

I have deleted all the data from the index, and re-index the data again but no effect. Can anyone tell me why the first 15 pages are empty? and how can I fix it?

When I print the results in hook_search_api_results_alter, it is something like this

"1wucgy--entity:node/2011:nl" => Drupal\search_api\Item\Item

When I go to the page where some content is displaying, The results are like this. enter image description here

So the nodes with 1wucgy-- are not displaying and the nodes without that hash are displaying.

So on the first 15 pages, all the nodes are prefixed with 1wucgy-- and that is why those pages are empty.

Is there any way to exclude these types of nodes from the results?

Kevin avatar
in flag
Basically this means items returned from Solr don't exist in the local Drupal database and cannot be loaded. You need to filter items by site hash / site id if you are indexing multiple sources.
kr flag
How can I filter them?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.