[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] manticore: json fields numeric sort

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <696ddaf02250b_2c1819108126d@gitlab-sidekiq-low-urgency-cpu-bound-v2-747b69684d-7jth7.mail>

Victor Emanouilov pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
46b4ad0f by Victor Emanouilov at 2026-01-19T09:19:05+02:00
[FIX] manticore: json fields numeric sort

- - - - -


1 changed file:

- lib/core/Search/Manticore/OrderBuilder.php


Changes:

=====================================
lib/core/Search/Manticore/OrderBuilder.php
=====================================
@@ -39,8 +39,11 @@ class OrderBuilder
             return $arguments['source'] . ' ' . $order->getOrder();
         } elseif ($field !== Order::FIELD_SCORE) {
             if ($isJsonField) {
-                // TODO: nsort or distance?
+                // TODO: distance?
                 $jsonPath = $this->index->getJsonPathForField($field);
+                if ($order->getMode() == Order::MODE_NUMERIC) {
+                    $jsonPath = "INTEGER($jsonPath)";
+                }
                 return $jsonPath . ' ' . $order->getOrder();
             }
             $mapping = $this->index ? $this->index->getFieldMapping($field) : [];



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/46b4ad0f8fb834428cc9935089909a23f4e232d4

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/46b4ad0f8fb834428cc9935089909a23f4e232d4
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.