Score:0

search api views, sort by most viewed?

zw flag

I have a view of content. I have enabled the statistics module and in the view I can add Sort: Statistics: Total Views.

I am now trying to make a similar view page but using search api.

Have enabled search API. and followed these instructions. https://www.drupal.org/docs/8/modules/search-api/getting-started/search-forms-and-results-pages/searching-with-views/creating-a-search-view

I now have a view which has a search box.

I am trying to add sort by statistics, but it is not an option.

The Search API guide says that it has sorts and filters on indexed fields. Under /config/search/search-api/index/default/fields I can add remove fields for the index but there is not an option to add the statistics field.

Is there away to get statistics working? Or would I need to create something like pseudofield which contains the statistics data and then index and sort on that?

I sit in a Tesla and translated this thread with Ai:

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.