| ... | ... | @@ -101,9 +101,22 @@ If a column on a big table is not indexed correctly, this search option will not |
|
|
|
|
|
|
|
This is an extension for IronAPI.
|
|
|
|
|
|
|
|
This sorts the result by how "close" it is to the supplied text. See the [Similarity Postgres Documentation](https://www.postgresql.org/docs/9.6/static/pgtrgm.html).
|
|
|
|
|
|
|
|
`POST /data/system/entity/query`
|
|
|
|
|
|
|
|
```json
|
|
|
|
{"attrs" : {"order_by" : {"-similarity" : ["me.name","constant"]}, "columns" : "me.name"}}
|
|
|
|
{
|
|
|
|
"attrs": {
|
|
|
|
"order_by": {
|
|
|
|
"-similarity": [
|
|
|
|
"me.name",
|
|
|
|
"constant"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"columns": "me.name"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
This will be translated to sql `ORDER BY me.name <-> ? : "constant"`.
|
| ... | ... | |