Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/solr9 upgrade #1406

Merged
merged 11 commits into from
Jul 21, 2023
2 changes: 1 addition & 1 deletion .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
ports:
- 5432:5432
solr:
image: solr:8.6
image: solr:9.2
ports:
- 8983:8983
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
ports:
- 5432:5432
solr:
image: solr:8.6
image: solr:9.2
ports:
- 8983:8983
steps:
Expand All @@ -43,7 +43,7 @@ jobs:
docker cp solr_conf ${{ job.services.solr.id }}:/opt/solr/server/solr/configsets/geniza
docker exec --user root ${{ job.services.solr.id }} /bin/bash -c "chown -R solr:solr /opt/solr/server/solr/configsets/geniza"
- name: Copy solr configsets to solr home directory (Solr 8 specific)
- name: Copy solr configsets to solr home directory
run: "docker exec -d ${{ job.services.solr.id }} cp -r /opt/solr/server/solr/configsets /var/solr/data"

# Python version to use is stored in the .python-version file, which is the
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
ports:
- 5432:5432
solr:
image: solr:8.6
image: solr:9.2
ports:
- 8983:8983
steps:
Expand Down
5 changes: 5 additions & 0 deletions DEPLOYNOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Deploy Notes

## 4.15

- The minimum required Solr version has been bumped to 9.2. Please upgrade to this version,
update Solr configset, and then reindex all content with `python manage.py index`.

## 4.14

- Seleucid calendar conversion is now implemented, so automatic conversion should be applied
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Princeton Geniza Project
Python/Django web application for a version 4.x of the `Princeton Geniza Project
<https://cdh.princeton.edu/projects/princeton-geniza-project/>`_.

Python 3.9 / Django 3.2 / Node 16 / Postgresql / Solr 8.6
Python 3.9 / Django 3.2 / Node 16 / Postgresql / Solr 9.2

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7347726.svg
:target: https://doi.org/10.5281/zenodo.7347726
Expand Down
4 changes: 3 additions & 1 deletion requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ django-modeltranslation==0.17.5
django-admin-sortable2
python-dateutil>=2.8
django-tabular-export
parasolr>=0.9
# NOTE: Once parasolr 0.10 is released, stop pulling it from git
git+https://github.com/Princeton-CDH/parasolr@develop
# parasolr>=0.9
django-gfklookupwidget
django-adminlogentries
django-autocomplete-light>=3.9.4
Expand Down
2 changes: 1 addition & 1 deletion solr_conf/conf/managed-schema
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.ICUFoldingFilterFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.NGramFilterFactory" minGramSize="2" maxGramSize="20" luceneMatchVersion="4.3"/>
<filter class="solr.NGramFilterFactory" minGramSize="2" maxGramSize="20" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
Expand Down
6 changes: 0 additions & 6 deletions solr_conf/conf/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
"facet": "on",
"facet.mincount": "1",
"": { "v": 0 }
},
"velocity": {
"wt": "velocity",
"v.template": "browse",
"v.layout": "layout",
"": { "v": 0 }
}
}
}
64 changes: 20 additions & 44 deletions solr_conf/conf/solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
affect both how text is indexed and queried.
-->
<!-- TODO: test this change.... -->
<luceneMatchVersion>7.0.0</luceneMatchVersion>
<luceneMatchVersion>9.2.0</luceneMatchVersion>

<!-- <lib/> directives can be used to instruct Solr to load any Jars
identified and use them to resolve any "plugins" specified in
Expand Down Expand Up @@ -73,20 +73,17 @@
The examples below can be used to load some solr-contribs along
with their external dependencies.
-->
<lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/modules/extraction/lib" regex=".*\.jar" />

<lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/modules/clustering/lib/" regex=".*\.jar" />

<lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/modules/langid/lib/" regex=".*\.jar" />

<lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-analysis-extras-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs/" regex="lucene-analyzers-icu-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib/" regex="icu4j-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib/" regex="solr-analysis-extras-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib/" regex="lucene-analysis-icu-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib/" regex="icu4j-\d.*\.jar" />

<lib dir="${solr.install.dir:../../../..}/modules/scripting/lib" regex=".*\.jar" />
<!-- an exact 'path' can be used instead of a 'dir' to specify a
specific jar file. This will cause a serious error to be logged
if it can't be loaded.
Expand Down Expand Up @@ -387,31 +384,18 @@
<maxBooleanClauses>1024</maxBooleanClauses>


<!-- Solr Internal Query Caches

There are two implementations of cache available for Solr,
LRUCache, based on a synchronized LinkedHashMap, and
FastLRUCache, based on a ConcurrentHashMap.

FastLRUCache has faster gets and slower puts in single
threaded operation and thus is generally faster than LRUCache
when the hit ratio of the cache is high (> 75%), and may be
faster under other scenarios on multi-cpu systems.
-->
<!-- Solr Internal Query Caches -->

<!-- Filter Cache

Cache used by SolrIndexSearcher for filters (DocSets),
unordered sets of *all* documents that match a query. When a
new searcher is opened, its caches may be prepopulated or
"autowarmed" using data from caches in the old searcher.
autowarmCount is the number of items to prepopulate. For
LRUCache, the autowarmed items will be the most recently
accessed items.
autowarmCount is the number of items to prepopulate.

Parameters:
class - the SolrCache implementation LRUCache or
(LRUCache or FastLRUCache)
class - the SolrCache implementation (CaffeineCache)
size - the maximum number of entries in the cache
initialSize - the initial capacity (number of entries) of
the cache. (see java.util.HashMap)
Expand All @@ -421,7 +405,7 @@
to occupy. Note that when this option is specified, the size
and initialSize parameters are ignored.
-->
<filterCache class="solr.FastLRUCache"
<filterCache class="solr.CaffeineCache"
size="512"
initialSize="512"
autowarmCount="0"/>
Expand All @@ -430,11 +414,8 @@

Caches results of searches - ordered lists of document ids
(DocList) based on a query, a sort, and the range of documents requested.
Additional supported parameter by LRUCache:
maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
to occupy
-->
<queryResultCache class="solr.LRUCache"
<queryResultCache class="solr.CaffeineCache"
size="512"
initialSize="512"
autowarmCount="0"/>
Expand All @@ -445,14 +426,14 @@
document). Since Lucene internal document ids are transient,
this cache will not be autowarmed.
-->
<documentCache class="solr.LRUCache"
<documentCache class="solr.CaffeineCache"
size="512"
initialSize="512"
autowarmCount="0"/>

<!-- custom cache currently used by block join -->
<cache name="perSegFilter"
class="solr.search.LRUCache"
class="solr.search.CaffeineCache"
size="10"
initialSize="0"
autowarmCount="10"
Expand Down Expand Up @@ -482,7 +463,7 @@
-->
<!--
<cache name="myUserCache"
class="solr.LRUCache"
class="solr.CaffeineCache"
size="4096"
initialSize="1024"
autowarmCount="1024"
Expand Down Expand Up @@ -729,7 +710,7 @@
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<str name="defType">edismax</str>
<str name="defType">lucene</str>
<!-- <str name="df">text</str> -->

<!-- keyword search field for geniza prototype -->
Expand Down Expand Up @@ -893,7 +874,7 @@
(SearchHandler) can be registered multiple times with different
names (and different init parameters)
-->
<requestHandler name="/browse" class="solr.SearchHandler" useParams="query,facets,velocity,browse">
<requestHandler name="/browse" class="solr.SearchHandler" useParams="query,facets,browse">
<lst name="defaults">
<str name="echoParams">explicit</str>
</lst>
Expand Down Expand Up @@ -1414,17 +1395,12 @@
<!--
Custom response writers can be declared as needed...
-->
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy">
<str name="template.base.dir">${velocity.template.base.dir:}</str>
<str name="solr.resource.loader.enabled">${velocity.solr.resource.loader.enabled:true}</str>
<str name="params.resource.loader.enabled">${velocity.params.resource.loader.enabled:false}</str>
</queryResponseWriter>

<!-- XSLT response writer transforms the XML output by any xslt file found
in Solr's conf/xslt directory. Changes to xslt files are checked for
every xsltCacheLifetimeSeconds.
-->
<queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
<queryResponseWriter name="xslt" class="solr.scripting.xslt.XSLTResponseWriter">
<int name="xsltCacheLifetimeSeconds">5</int>
</queryResponseWriter>

Expand Down
Loading