packages-static: update solr files

This commit is contained in:
Brendan Early 2021-07-11 20:33:20 -05:00
parent 6d8667f4c1
commit 4af473e648
No known key found for this signature in database
GPG key ID: 25CF7F7DE2FF5AA9
5 changed files with 86 additions and 26 deletions

View file

@ -21,6 +21,8 @@ data:
{{ load_file('packages/solrconfig.xml') | indent }}
schema.xml: |-
{{ load_file('packages/schema.xml') | indent }}
stopwords_en.txt: |-
{{ load_file('packages/stopwords_en.txt') | indent }}
---
apiVersion: v1
kind: ConfigMap

View file

@ -5,7 +5,6 @@
<field name="_nest_path_" type="_nest_path_" />
<fieldType name="_nest_path_" class="solr.NestPathField" />
<!-- TODO: add facets for fedora version -->
<!-- TODO: tokenize lib out of package names? -->
<fieldType name="nameText" class="solr.TextField">
<analyzer type="index">
@ -16,42 +15,42 @@
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterGraphFilterFactory" />
<filter class="solr.WordDelimiterGraphFilterFactory" preserveOriginal="1" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<!-- Currently disabled. TODO: turn \n into space, stem filter not working -->
<!-- <fieldType name="descText" class="solr.SortableTextField" positionIncrementGap="100" uninvertible="false">
<fieldType name="descText" class="solr.SortableTextField" positionIncrementGap="100" uninvertible="false">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.SynonymGraphFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
<filter class="solr.FlattenGraphFilterFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt" />
<filter class="solr.PatternReplaceFilterFactory" pattern="\n" replacement=" "/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt" />
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<filter class="solr.EnglishMinimalStemFilterFactory"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt" />
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt" />
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<filter class="solr.EnglishMinimalStemFilterFactory"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
</fieldType> -->
</fieldType>
<fieldType name="plong" class="solr.LongPointField" docValues="true"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
<field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
<field name="name" type="nameText" indexed="true" stored="true" required="true" multiValued="false"/>
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<uniqueKey>id</uniqueKey>
<copyField source="id" dest="name"/>
<field name="description" type="string" indexed="false" stored="true" />
<!-- Package name-->
<field name="name" type="nameText" indexed="true" stored="true" multiValued="false" required="true"/>
<!-- source package name-->
<field name="srcName" type="nameText" indexed="true" stored="true" multiValued="false" required="true"/>
<field name="srcName_string" type="string" indexed="false" stored="false" multiValued="false" docValues="true" required="true"/>
<copyField source="srcName" dest="srcName_string" />
<!-- Package summary -->
<field name="summary" type="descText" indexed="true" stored="true" multiValued="false" />
<!-- Releases package is in -->
<field name="releases" type="string" indexed="false" stored="true" multiValued="true" docValues="true" />
</schema>

View file

@ -257,7 +257,7 @@
For more details see http://wiki.apache.org/solr/SolrJmx
-->
<jmx />
<!-- <jmx /> -->
<!-- If you want to connect to a particular server, specify the
agentId
-->
@ -957,6 +957,12 @@
See http://wiki.apache.org/solr/GuessingFieldTypes
-->
<updateRequestProcessorChain name="uuid">
<processor class="solr.UUIDUpdateProcessorFactory">
<str name="fieldName">id</str>
</processor>
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>`
<!-- <updateProcessor class="solr.UUIDUpdateProcessorFactory" name="uuid"/>
<updateProcessor class="solr.RemoveBlankFieldUpdateProcessorFactory" name="remove-blank"/>
<updateProcessor class="solr.FieldNameMutatingUpdateProcessorFactory" name="field-name-mutating">
@ -1077,6 +1083,7 @@
-->
<!-- example of registering a query parser -->
<queryParser name="simple" class="solr.search.SimpleQParserPlugin"/>
<queryParser name="dismax" class="solr.search.DisMaxQParserPlugin"/>
<!-- Function Parsers

View file

@ -0,0 +1,54 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# a couple of test stopwords to test that the words are really being
# configured from this file:
stopworda
stopwordb
# Standard english stop words taken from Lucene's StopAnalyzer
a
an
and
are
as
at
be
but
by
for
if
in
into
is
it
no
not
of
on
or
such
that
the
their
then
there
these
they
this
to
was
will
with

View file

@ -14,14 +14,12 @@ fi
. /opt/docker-solr/scripts/run-initdb
# Manually arrange config files into directory structure solr needs because openshift just won't let this be simple
mkdir -p /var/solr/openshift/packages
cp /opt/solr/server/solr/configsets/packages/schema.xml /var/solr/openshift/packages
mkdir -p /var/solr/data/configsets/packages
cp /opt/solr/server/solr/configsets/packages/schema.xml /var/solr/data/configsets/packages
cp /opt/solr/server/solr/configsets/packages/stopwords_en.txt /var/solr/data/configsets/packages
mkdir -p /var/solr/openshift/packages/conf
cp /opt/solr/server/solr/configsets/packages/solrconfig.xml /var/solr/openshift/packages/conf
# Create the core
/opt/docker-solr/scripts/precreate-core "packages" /var/solr/openshift/packages
mkdir -p /var/solr/data/configsets/packages/conf
cp /opt/solr/server/solr/configsets/packages/solrconfig.xml /var/solr/data/configsets/packages/conf
#!/bin/bash
#