2

I'm working on maintaining a site that has a view of type (Content Index). This is the only site I've worked on that has had this view type on it. I may have traced that view type down to Search API.

The issue is I have a table that I need to be able to have the fields be sortable. Right now there is one field that is sortable, but when I go into the Format/table settings, that is the only field (with the exception of the Node ID) that has a checkbox for sortable.

To check to make sure there wasn't anything wonkey going on with the fields, I created a quick view of type content (so a basic view) and recreated it, and all the fields provided were sortable, not just this one.

Is there a reason that one field would be sortable and not the rest, and if so is there something special that needs to be done in order to get the Content Indexed views to have more fields be sortable?

EDIT: "Content Indexed" view type is generated by search API, not Views Aggregator Plus. The body of the question has been updated to reflect this.

0

As indicated in the edit, the "Content Indexed" view type comes from the module Search API. After digging around I was able to find the page

admin/config/search/search_api

Which houses a bunch of search indexing. For me, I was able to go into the "Content Index" and find a list of fields, with options for how they are indexed. At the top of this page there is the help text:

The datatype of a field determines how it can be used for searching and filtering. Fields indexed with type "Fulltext" and multi-valued fields (marked with 1) cannot be used for sorting.

I noted some the fields I was trying to sort on were listed ether as full texted, or did not have an option set for indexing at all. Setting these fields to something other than "Fulltext" allowed them to become sortable in the view.

0

In view, you need to add the fields showing as Indexed content: only these are sortable.

If you are unable to find the fields in the list you need to first index them, in Search API configuration page.

As you have already created the Index in Search API modify that.

Goto edit and select fields tab and select the fields you want to index (checkbox). Save changes

Reindex them, you must reindex to get indexed fields updated in the view.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.