Orchardcore: Order Liquid Query by field

Created on 19 Dec 2019  路  3Comments  路  Source: OrchardCMS/OrchardCore

i added a new field "ordershow " to set a number of order blogs. how can i use this field in a query?

i checked the index otion and i have this field when i run the query: "Blog.ordershow"

{
  "query": {
    "term" : { "Content.ContentItem.ContentType" : "Blog" } 
  },
  "sort": { "Content.ContentItem.Blog.ordershow": { "order": "asc" } } ,
  "size": 3
}

Lucene documentation

All 3 comments

For @Skrypt

{
  "query": {
    "term": {
      "Content.ContentItem.ContentType": "Blog"
    }
  },
  "sort": {
    "Content.ContentItem.Blog.ordershow": {
      "order": "asc",
      "type": "double"
    }
  },
  "size": 3
}

We are missing documentation on how to select the proper type on a sort query.
See https://lucene.apache.org/core/7_3_1/core/org/apache/lucene/search/SortField.Type.html
I'm closing as this is a duplicate of #3278

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ns8482e picture ns8482e  路  4Comments

hishamco picture hishamco  路  3Comments

chillibug picture chillibug  路  4Comments

mobinzk picture mobinzk  路  4Comments

szilardcsere89 picture szilardcsere89  路  3Comments