You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you set your limit criteria and set the context to be tags, what order are the matched entries returned in? Is it by date by default and is there a way to randomise this?
The text was updated successfully, but these errors were encountered:
The order is set to the count of how many elements (tags in your case), the resulting elements have in common with the source element. So, for instance, an element that has three tags that are the same as the tags of the base element would come first, then the ones that have two, then one, and so on. If you add an order to the criteria that you pass in, this will be appended to the sort order. So, if you added { order: 'title' }, the final order parameter would be { order: 'count desc, title' }. Crafts default is postDate.
Not sure why you'd want to have the result randomized, the whole point of the plugin is to get the most simliar entries. If you just want a random selection of entries, you could just use craft.entries with { order: 'RAND()' }.
Great. Yep, that makes sense and helps to clarify. Would there be any way to also pass in a date relevant weighting of some kind? Although you don't just want things ordered by date as matching by criteria is definitely the most useful, it could also be useful to be able to weight the newer entries a little higher than older ones as they're most likely to be of greater relevance. It starts dipping into the complexities of search indexing but just a thought.
Thanks for both the plugin and the quick reply btw.
When you set your limit criteria and set the context to be tags, what order are the matched entries returned in? Is it by date by default and is there a way to randomise this?
The text was updated successfully, but these errors were encountered: