How to sort views based on wheter an item is flagged or not

Created on 16 December 2024, 8 days ago

Problem/Motivation

Hello and thank you for this great module,

I'm remaking a drupal 7 website with drupal 11. I use views to display a list of indexed contents and I need to put content that is flagged with flag "first" on top of the list.
In drupal 7 I was able to add to the search index "Whether the entity is flagged with flag first" and then it was very easy to select this in the sorting options. In drupal 11 I can't add anything like that to the search api index, I could add some flag items like flag id and date of flag creation and others but these are not even available on the sorting options. I tried to create a flag relationtip but also that doesn't seem very useful for sorting content.

Thank you very much in advance for any suggestion on how to use flag to sort content in views of search api indexed content.

Steps to reproduce

Drupal 11.0.9
search api 8.x-1.37
flag 8.x-4.0-beta5
flag search api 2.0.1

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024