0

In views I have my items being sorted by date and then relevancy . Although unless the items are posted at exactly the same time this means that the relevancy score is made redundant.

I can’t seem to add a date boost to the relevancy but have figured if I could Sort the date in blocks of time ( i.e. a day ) this would give me the results that I’m looking for. Then items to be sorted by the day they are posted; and then by relevancy.

I understand that in SQL I can use ‘ GROUP BY datepart’ to do this. Has anyone done anything like this in Views.

1

I couldn't find any way to do this using the options in the View UI. One way to accomplish it, however, might be to add an additional field to your content type that stores only the day/month/year for the date (set the default to 'now' so that you don't have to manually enter the date, and set the field to 'hidden' on the display options), and then you could use that field to group by in the view.

| improve this answer | |

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.