I have a channel with a category group. I need the search to order results if a certain category has been selected by placing them at the top, and entries with the same category to be then ordered by date.
Is this possible using solspace search?
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.
Sign up to join this communityI have a channel with a category group. I need the search to order results if a certain category has been selected by placing them at the top, and entries with the same category to be then ordered by date.
Is this possible using solspace search?
This isn't possible with Super Search as is. However, you could attempt to run a workaround with the Preparse add-on (free). What it allows you to do is parse other content into a new custom field (let's call it "my_category_field") from an EE template (used only for formatting/parsing the entry data) at time of publishing/updating of entry. So, you could have Preparse set to load the "my_category_field" field with the usual category tags in your Preparse template:
{exp:channel:entries entry_id="{preparse_entry_id}"}
{categories}{category_name}{/categories}
{/exp:channel:entries}
And Preparse will parse out the category data into a your "my_category_field" field, allowing you to then have Super Search results order the results by your "my_category_field" custom field + date.
Please let me know if that makes sense! :)