Skip to content

Commit

Permalink
Merge pull request #883 from dof-dss/D8UN-uat
Browse files Browse the repository at this point in the history
Release 0.22.1
  • Loading branch information
ooneill547 authored Nov 9, 2021
2 parents 821a27c + 9e083ab commit 7382f77
Show file tree
Hide file tree
Showing 924 changed files with 42,930 additions and 895 deletions.
24 changes: 16 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,24 @@ jobs:
fi
done
- run:
name: Force purge of Solr index
command: /home/circleci/.platformsh/bin/platform ssh -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH "curl http://${PLATFORM_SOLR_HOST_UREGNI}/solr/uregni_index/update --data '<delete><query>*:*</query></delete>' -H 'Content-type:text/xml; charset=utf-8' && curl http://${PLATFORM_SOLR_HOST_UREGNI}/solr/uregni_index/update --data '<commit/>' -H 'Content-type:text/xml; charset=utf-8'"
- run:
name: Rebuild the Solr index
name: Purge and rebuild Solr indexes
command: |
for site in uregni
for site in `ls -l ~/project/web/sites | grep ^d | awk '!/default/{print $9}'`
do
platform drush 'sapi-c -l uregni' -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH
platform drush 'sapi-r -l uregni' -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH
platform drush 'sapi-i -l uregni' -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH
result=$(platform drush "st -l ${site}" -y -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH | (grep "Drupal bootstrap : Successful" || true) )
if [[ -n $result ]]; then
result2=$(platform drush "pml --status=enabled -l ${site}" -y -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH | (grep "solr" || true) )
if [[ -n $result2 ]]; then
echo "***** Purge Solr index for - ${site} *****"
platform ssh -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH \
"curl http://${site}_solr.internal:8080/solr/${site}_index/update --data '<delete><query>*:*</query></delete>' -H 'Content-type:text/xml; charset=utf-8' \
&& curl http://${site}_solr.internal:8080/solr/${site}_index/update --data '<commit/>' -H 'Content-type:text/xml; charset=utf-8'"
echo "***** Rebuild the Solr index for - ${site} *****"
platform drush 'sapi-c -l ${site}' -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH
platform drush 'sapi-r -l ${site}' -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH
platform drush 'sapi-i -l ${site}' -p $PLATFORM_PROJECT_ID -e $EDGE_BUILD_BRANCH
fi
fi
done
workflows:
Expand Down
1 change: 1 addition & 0 deletions .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ proxy:
- octf.gov.uk.lndo.site
- urologyservicesinquiry.org.uk.lndo.site
- mahinquiry.org.uk.lndo.site
- independentreviewofeducation.org.uk.lndo.site
services:
uregni_solr:
type: solr:7
Expand Down
25 changes: 24 additions & 1 deletion .lando/config/solr/7.x/default/schema_extra_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
<fieldType name="text_edgenstring" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
Expand All @@ -25,6 +27,7 @@
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="1" generateNumberParts="1" protected="protwords_und.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="1"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
Expand All @@ -33,6 +36,7 @@
<analyzer type="query">
<charFilter class="solr.MappingCharFilterFactory" mapping="accents_und.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
Expand All @@ -48,6 +52,7 @@
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="1" generateNumberParts="1" protected="protwords_en.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="1"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords_en.txt"/>
Expand All @@ -59,6 +64,7 @@
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms_en.txt" expand="true" ignoreCase="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="0" generateNumberParts="1" protected="protwords_en.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="0"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords_en.txt"/>
Expand All @@ -80,6 +86,7 @@
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="1" generateNumberParts="1" protected="protwords_en.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="1"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
Expand All @@ -90,6 +97,7 @@
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms_en.txt" expand="true" ignoreCase="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="0" generateNumberParts="1" protected="protwords_en.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="0"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
Expand All @@ -104,6 +112,7 @@
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="1" generateNumberParts="1" protected="protwords_und.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="1"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.BeiderMorseFilterFactory" languageSet="auto" nameType="GENERIC" ruleType="APPROX" concat="true"/>
Expand All @@ -113,6 +122,7 @@
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="0" generateNumberParts="1" protected="protwords_und.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="0"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.BeiderMorseFilterFactory" languageSet="auto" nameType="GENERIC" ruleType="APPROX" concat="true"/>
Expand All @@ -128,6 +138,7 @@
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="1" generateNumberParts="1" protected="protwords_en.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="1"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.BeiderMorseFilterFactory" languageSet="english" nameType="GENERIC" ruleType="APPROX" concat="true"/>
Expand All @@ -137,6 +148,7 @@
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="0" generateNumberParts="1" protected="protwords_en.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="0"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.BeiderMorseFilterFactory" languageSet="english" nameType="GENERIC" ruleType="APPROX" concat="true"/>
Expand All @@ -153,16 +165,20 @@
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="1" generateNumberParts="1" protected="protwords_und.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="1"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords_und.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<charFilter class="solr.MappingCharFilterFactory" mapping="accents_und.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms_und.txt" expand="true" ignoreCase="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms_und.txt" expand="true" ignoreCase="true"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="0" generateNumberParts="1" protected="protwords_und.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="0"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
Expand All @@ -176,6 +192,7 @@
<analyzer>
<charFilter class="solr.MappingCharFilterFactory" mapping="accents_und.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
Expand All @@ -193,12 +210,14 @@
<fieldType name="text_ngramstring" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="2" maxGramSize="25"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
Expand All @@ -213,6 +232,7 @@
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="1" generateNumberParts="1" protected="protwords_und.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="1"/>
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
Expand All @@ -221,6 +241,9 @@
<analyzer type="query">
<charFilter class="solr.MappingCharFilterFactory" mapping="accents_und.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms_und.txt" expand="true" ignoreCase="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_und.txt"/>
<filter class="solr.WordDelimiterGraphFilterFactory" catenateNumbers="0" generateNumberParts="1" protected="protwords_und.txt" splitOnCaseChange="0" generateWordParts="1" preserveOriginal="1" catenateAll="0" catenateWords="0"/>
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
Expand Down
35 changes: 18 additions & 17 deletions .lando/config/solr/7.x/default/solrconfig_extra.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
<str name="field">spellcheck_en</str>
<str name="classname">solr.DirectSolrSpellChecker</str>
<str name="distanceMeasure">internal</str>
<str name="accuracy">0.5</str>
<str name="accuracy">0.01</str>
<str name="maxEdits">2</str>
<str name="minPrefix">1</str>
<str name="maxInspections">5</str>
<str name="minQueryLength">4</str>
<str name="maxQueryFrequency">0.01</str>
<str name="thresholdTokenFrequency">.01</str>
<str name="onlyMorePopular">true</str>
<str name="minPrefix">3</str>
<str name="maxInspections">10</str>
<str name="minQueryLength">3</str>
<str name="maxQueryFrequency">0.1</str>
<str name="thresholdTokenFrequency">.0001</str>
<str name="onlyMorePopular">false</str>
</lst>

<lst name="spellchecker">
<str name="name">und</str>
<str name="field">spellcheck_und</str>
<str name="classname">solr.DirectSolrSpellChecker</str>
<str name="distanceMeasure">internal</str>
<str name="accuracy">0.5</str>
<str name="accuracy">0.01</str>
<str name="maxEdits">2</str>
<str name="minPrefix">1</str>
<str name="maxInspections">5</str>
<str name="minQueryLength">4</str>
<str name="maxQueryFrequency">0.01</str>
<str name="thresholdTokenFrequency">.01</str>
<str name="onlyMorePopular">true</str>
<str name="minPrefix">3</str>
<str name="maxInspections">10</str>
<str name="minQueryLength">3</str>
<str name="maxQueryFrequency">0.1</str>
<str name="thresholdTokenFrequency">.0001</str>
<str name="onlyMorePopular">false</str>
</lst>
</searchComponent>
<searchComponent name="suggest" class="solr.SuggestComponent">
Expand All @@ -40,7 +40,7 @@
<str name="buildOnCommit">true</str>
<str name="buildOnStartup">false</str>
</lst>

<lst name="suggester">
<str name="name">und</str>
<str name="lookupImpl">AnalyzingInfixLookupFactory</str>
Expand Down Expand Up @@ -126,7 +126,7 @@
<str name="echoParams">explicit</str>
<str name="omitHeader">true</str>
<str name="timeAllowed">${solr.selectSearchHandler.timeAllowed:-1}</str>
<str name="spellcheck">false</str>
<str name="spellcheck">true</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
Expand All @@ -142,6 +142,7 @@
<lst name="defaults">
<str name="df">id</str>
<str name="spellcheck.dictionary">und</str>
<str name="spellcheck.dictionary">wordbreak</str>
<str name="spellcheck">on</str>
<str name="spellcheck.onlyMorePopular">false</str>
<str name="spellcheck.extendedResults">false</str>
Expand Down
35 changes: 35 additions & 0 deletions .lando/config/solr/7.x/default/stopwords_und.txt
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
a
an
and
are
as
at
be
but
by
for
if
in
into
is
it
no
not
of
on
or
s
such
t
that
the
their
then
there
these
they
this
to
was
will
with

1 change: 1 addition & 0 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ relationships:
octf: 'db:octf'
urologyservicesinquiry: 'db:urologyservicesinquiry'
mahinquiry: 'db:mahinquiry'
independentreviewofeducation: 'db:independentreviewofeducation'

# The size of the persistent disk of the application (in MB).
disk: 30720
Expand Down
16 changes: 16 additions & 0 deletions .platform/routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,22 @@

#---------------------------------

"https://www.independentreviewofeducation.org.uk/":
type: upstream
upstream: "unity:http"
cache:
enabled: false

"https://independentreviewofeducation.org.uk.{default}/":
type: redirect
to: "https://www.independentreviewofeducation.org.uk.{default}/"

"https://independentreviewofeducation.org.uk/":
type: redirect
to: "https://www.independentreviewofeducation.org.uk/"

#---------------------------------

# Catch all.
"https://www.{all}/":
type: upstream
Expand Down
5 changes: 5 additions & 0 deletions .platform/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ db:
- octfdb
- urologyservicesinquirydb
- mahinquirydb
- independentreviewofeducationdb
endpoints:
uregni:
default_schema: uregnidb
Expand Down Expand Up @@ -66,6 +67,10 @@ db:
default_schema: mahinquirydb
privileges:
mahinquirydb: admin
independentreviewofeducation:
default_schema: independentreviewofeducationdb
privileges:
independentreviewofeducationdb: admin

# Fudging the service name forces a full rebuild with any new config.
solr:
Expand Down
Loading

0 comments on commit 7382f77

Please sign in to comment.