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

gcruz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 0d510374fec0ed61c31f5e24abea49e1fdaf5b67
Author: Dave Brondsema <dbronds...@slashdotmedia.com>
AuthorDate: Wed Aug 21 15:55:11 2024 -0400

    be explicit about docValues for faceting used on tickets
---
 ForgeTracker/forgetracker/search.py | 1 +
 solr_config/allura/conf/schema.xml  | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/ForgeTracker/forgetracker/search.py 
b/ForgeTracker/forgetracker/search.py
index aaec822ea..10cd3c083 100644
--- a/ForgeTracker/forgetracker/search.py
+++ b/ForgeTracker/forgetracker/search.py
@@ -22,6 +22,7 @@ import six
 
 FACET_PARAMS = {
     'facet': 'true',
+    # fields used in faceting should have docValues="true" in solr, for faster 
performance
     'facet.field': ['_milestone_s', 'status_s', 'assigned_to_s', 
'reported_by_s'],
     'facet.limit': -1,
     'facet.sort': 'index',
diff --git a/solr_config/allura/conf/schema.xml 
b/solr_config/allura/conf/schema.xml
index fcb1ced3b..8c0059b51 100644
--- a/solr_config/allura/conf/schema.xml
+++ b/solr_config/allura/conf/schema.xml
@@ -112,6 +112,12 @@
    <!-- END of required field values -->
 
    <field name="title" type="text_general" indexed="true" stored="true" 
multiValued="true"/>
+   <!-- these are dynamic *_s but we add specific records to set 
docValues="true" and ensure faster facet performance
+        (although *_s seems to have docValues by default, but lets be 
explicit) -->
+   <field name="_milestone_s" type="string"   indexed="true"  stored="true" 
docValues="true"/>
+   <field name="status_s"     type="string"   indexed="true"  stored="true" 
docValues="true"/>
+   <field name="assigned_to_s" type="string"  indexed="true"  stored="true" 
docValues="true"/>
+   <field name="reported_by_s" type="string"  indexed="true"  stored="true" 
docValues="true"/>
 
    <!-- Dynamic field definitions allow using convention over configuration
        for fields via the specification of patterns to match field names.

Reply via email to