You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2026/06/24 21:11:37 UTC

(allura) branch db/solr_nones created (now ab558532a)

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a change to branch db/solr_nones
in repository https://gitbox.apache.org/repos/asf/allura.git


      at ab558532a stringify some ids

This branch includes the following new commits:

     new e0acd3bab don't pass sort=None etc to solr
     new ab558532a stringify some ids

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(allura) 02/02: stringify some ids

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch db/solr_nones
in repository https://gitbox.apache.org/repos/asf/allura.git

commit ab558532a3cba64f84f059b6891e7eee76da16da
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Wed Jun 24 17:11:30 2026 -0400

    stringify some ids
---
 Allura/allura/model/artifact.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index 5c7093691..761f49f01 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -825,7 +825,7 @@ class __mongometa__:
     def index(self):
         result = Artifact.index(self)
         result.update(
-            _id_s=self._id,
+            _id_s=str(self._id),
             short_s=self.short,
             timestamp_dt=self.timestamp,
             full_s=self.full)
@@ -875,7 +875,7 @@ class __mongometa__:
     def index(self):
         result = Artifact.index(self)
         result.update(
-            _id_s=self._id,
+            _id_s=str(self._id),
             short_s=self.short,
             timestamp_dt=self.timestamp,
             full_s=self.full)


(allura) 01/02: don't pass sort=None etc to solr

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch db/solr_nones
in repository https://gitbox.apache.org/repos/asf/allura.git

commit e0acd3bab7c31a1d495511ab6a2f2a74a4554fd2
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Wed Jun 24 17:11:21 2026 -0400

    don't pass sort=None etc to solr
---
 Allura/allura/lib/search.py | 4 ++++
 Allura/allura/lib/solr.py   | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/Allura/allura/lib/search.py b/Allura/allura/lib/search.py
index b234a863b..701330b01 100644
--- a/Allura/allura/lib/search.py
+++ b/Allura/allura/lib/search.py
@@ -181,6 +181,10 @@ def search(q, short_timeout=False, ignore_errors=True, search_fn=None, **kw):
             search_fn = g.solr_short_timeout.search
         else:
             search_fn = g.solr.search
+
+    # don't pass through sort=None etc
+    kw = {k: v for k, v in kw.items() if v is not None}
+
     try:
         # try once with opportunity to retry
         try:
diff --git a/Allura/allura/lib/solr.py b/Allura/allura/lib/solr.py
index 68fddb3c6..b8f270a59 100644
--- a/Allura/allura/lib/solr.py
+++ b/Allura/allura/lib/solr.py
@@ -176,6 +176,9 @@ def commit(self):
         pass
 
     def search(self, q, fq=None, **kw):
+        for k, v in kw.items():
+            if v is None:
+                raise ValueError(f'{k}={v} passed to solr search')
         if q is None:
             q = ''  # shlex will hang on None
         # Parse query