I need to select n items of a ContentType in OrchardCore randomly using query DSL but every time it returns the same result. Actually I think that it is not a correct approach. Here is the query DSL code:
{
"query": {
"term": { "Content.ContentItem.ContentType": "Product" }
},
"sort": [
{ "Content.ContentItem.CreatedUtc": { "order": "random" } }
],
"size": 3
}
Actually I followed this link https://github.com/OrchardCMS/OrchardCore/issues/6916#issuecomment-674504976