Skip to content

Commit 68097e0

Browse files
committed
first pass upgrading to solr 10. Disable querqy, and otel
1 parent 96edf8b commit 68097e0

5 files changed

Lines changed: 29 additions & 80 deletions

File tree

docker-compose.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,9 @@ services:
7272
- SOLR_OPTS=-XX:-UseLargePages
7373
- SOLR_HEAP=1g
7474
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
75-
- JAEGER_SERVICE_NAME=solr1 # not working ;-(
76-
- JAEGER_SAMPLER_TYPE=const
77-
- JAEGER_SAMPLER_PARAM=${JAEGER_SAMPLER_PARAM}
78-
- JAEGER_AGENT_HOST=jaeger
79-
- JAEGER_AGENT_PORT=5775
80-
- "SOLR_OPTS=-Dsolr.auth.jwt.allowOutboundHttp=true -Dsolr.modules=jwt-auth,jaegertracer-configurator"
75+
- OTEL_SERVICE_NAME=solr
76+
- OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED}
77+
- "SOLR_OPTS=-Dsolr.auth.jwt.outbound.http.enabled=true -Dsolr.modules=jwt-auth,opentelemetry"
8178
depends_on:
8279
- zoo1
8380
- zoo2
@@ -93,12 +90,9 @@ services:
9390
- SOLR_OPTS=-XX:-UseLargePages
9491
- SOLR_HEAP=1g
9592
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
96-
- JAEGER_SERVICE_NAME=solr2
97-
- JAEGER_SAMPLER_TYPE=const
98-
- JAEGER_SAMPLER_PARAM=${JAEGER_SAMPLER_PARAM}
99-
- JAEGER_AGENT_HOST=jaeger
100-
- JAEGER_AGENT_PORT=5775
101-
- "SOLR_OPTS=-Dsolr.auth.jwt.allowOutboundHttp=true -Dsolr.modules=jwt-auth,jaegertracer-configurator"
93+
- OTEL_SERVICE_NAME=solr
94+
- OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED}
95+
- "SOLR_OPTS=-Dsolr.auth.jwt.outbound.http.enabled=true -Dsolr.modules=jwt-auth,opentelemetry"
10296
depends_on:
10397
- zoo1
10498
- zoo2
@@ -114,12 +108,9 @@ services:
114108
- SOLR_OPTS=-XX:-UseLargePages
115109
- SOLR_HEAP=1g
116110
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
117-
- JAEGER_SERVICE_NAME=solr3
118-
- JAEGER_SAMPLER_TYPE=const
119-
- JAEGER_SAMPLER_PARAM=${JAEGER_SAMPLER_PARAM}
120-
- JAEGER_AGENT_HOST=jaeger
121-
- JAEGER_AGENT_PORT=5775
122-
- "SOLR_OPTS=-Dsolr.auth.jwt.allowOutboundHttp=true -Dsolr.modules=jwt-auth,jaegertracer-configurator"
111+
- OTEL_SERVICE_NAME=solr
112+
- OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED}
113+
- "SOLR_OPTS=-Dsolr.auth.jwt.outbound.http.enabled=true -Dsolr.modules=jwt-auth,opentelemetry"
123114
depends_on:
124115
- zoo1
125116
- zoo2

quickstart.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ check_prerequisites
5757
services="blacklight solr1 solr2 solr3 keycloak"
5858

5959
if $observability; then
60-
export JAEGER_SAMPLER_PARAM="1"
60+
#export JAEGER_SAMPLER_PARAM="1"
6161
services="${services} grafana solr-exporter jaeger"
6262
else
63-
# Prevents Jaeger in Solr from attempting to send events.
64-
export JAEGER_SAMPLER_PARAM=
63+
# Prevents OpenTelementry in Solr from attempting to send events.
64+
export OTEL_SDK_DISABLED=true
6565
fi
6666

6767
if $offline_lab; then
@@ -130,17 +130,15 @@ log_minor "waiting for security.json to be available to all Solr nodes"
130130
log_major "Packaging ecommerce configset."
131131
(cd solr/configsets/ecommerce/conf && zip -r - *) > ./solr/configsets/ecommerce.zip
132132
log_minor "posting ecommerce.zip configset"
133-
curl --user solr:SolrRocks -X PUT --header "Content-Type:application/octet-stream" --data-binary @./solr/configsets/ecommerce.zip "http://localhost:8983/api/cluster/configs/ecommerce"
133+
curl --user solr:SolrRocks -X PUT --header "Content-Type:application/octet-stream" --data-binary @./solr/configsets/ecommerce.zip "http://localhost:8983/api/configsets/ecommerce"
134134
log_major "Creating ecommerce collection."
135135
curl --user solr:SolrRocks -X POST http://localhost:8983/api/collections -H 'Content-Type: application/json' -d'
136136
{
137-
"create": {
138-
"name": "ecommerce",
139-
"config": "ecommerce",
140-
"numShards": 2,
141-
"replicationFactor": 1,
142-
"waitForFinalState": true
143-
}
137+
"name": "ecommerce",
138+
"config": "ecommerce",
139+
"numShards": 2,
140+
"replicationFactor": 1,
141+
"waitForFinalState": true
144142
}
145143
'
146144

solr/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM solr:9.1.1
1+
FROM solr:10.0.0
22

3-
COPY --chown=solr:solr solr.xml /var/solr/data/
3+
#COPY --chown=solr:solr solr.xml /var/solr/data/
44

5-
COPY ./lib/querqy-solr-5.6.lucene900.0-jar-with-dependencies.jar /opt/querqy/lib/
6-
COPY ./lib/querqy-embeddings-rewriter-1.0.0-SNAPSHOT.jar /opt/querqy/lib/
7-
COPY ./lib/querqy-regex-filter-1.1.0-SNAPSHOT.jar /opt/querqy/lib/
5+
COPY ./lib/querqy-solr-5.6.lucene900.0-jar-with-dependencies.jar /opt/solr-10.0.0/lib
6+
COPY ./lib/querqy-embeddings-rewriter-1.0.0-SNAPSHOT.jar /opt/solr-10.0.0/lib
7+
COPY ./lib/querqy-regex-filter-1.1.0-SNAPSHOT.jar /opt/solr-10.0.0/lib

solr/configsets/ecommerce/conf/solrconfig.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
<codecFactory class="solr.SchemaCodecFactory"/>
99

1010
<!-- Load the Querqy Jar that comes with all it's dependencies -->
11-
<lib dir="/opt/querqy/lib/" />
11+
<!--lib dir="/opt/querqy/lib/" /-->
1212

1313
<dataDir>${solr.data.dir:}</dataDir>
1414

1515
<directoryFactory name="DirectoryFactory"
1616
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
1717
<schemaFactory class="ManagedIndexSchemaFactory"/>
1818

19-
<luceneMatchVersion>8.9</luceneMatchVersion>
19+
<luceneMatchVersion>10.0</luceneMatchVersion>
2020

2121
<updateHandler class="solr.DirectUpdateHandler2">
2222
<commitWithin>
@@ -55,7 +55,7 @@
5555
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
5656
</query>
5757

58-
<queryParser name="querqy" class="querqy.solr.QuerqyDismaxQParserPlugin">
58+
<queryParser name="querqy" class="querqy.solr.QuerqyDismaxQParserPlugin" startup="lazy">
5959
<bool name="skipUnknownRewriters">true</bool>
6060
<lst name="infoLogging">
6161
<!--
@@ -114,12 +114,13 @@
114114

115115

116116
<!-- Override the default QueryComponent -->
117-
<searchComponent name="query" class="querqy.solr.QuerqyQueryComponent"/>
117+
<!-- Need Solr 10 version -->
118+
<!--searchComponent name="query" class="querqy.solr.QuerqyQueryComponent"/-->
118119

119120
<!--
120121
Add the Querqy request handler.
121122
-->
122-
<requestHandler name="/querqy/rewriter" class="querqy.solr.QuerqyRewriterRequestHandler"/>
123+
<requestHandler name="/querqy/rewriter" class="querqy.solr.QuerqyRewriterRequestHandler" startup="lazy"/>
123124

124125
<!-- Used in the Solr Admin UI -->
125126
<requestHandler name="/select" class="solr.SearchHandler">

solr/solr.xml

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)