Commit c4d5f392 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: sort allDocs by search_rank by default

parent 8cb2d6f3
...@@ -125,7 +125,10 @@ ...@@ -125,7 +125,10 @@
// throw new Error('do not use all docs'); // throw new Error('do not use all docs');
if (options.list_method_template === undefined) { if (options.list_method_template === undefined) {
return wrapJioCall(this, 'allDocs', arguments); if ((!options.sort_on) || (options.sort_on.length === 0)) {
options.sort_on = [["search_rank", "DESC"]];
}
return wrapJioCall(this, 'allDocs', [options]);
} }
function triggerAllDocs() { function triggerAllDocs() {
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>984.41193.2075.29252</string> </value> <value> <string>996.52312.58609.31129</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1598877889.43</float> <float>1639387808.91</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment