From: Dennis Schafroth Date: Tue, 20 Aug 2013 11:36:17 +0000 (+0200) Subject: New masterkey-lui-solr3 (split from masterkey-lui-solr) X-Git-Tag: v0.5.0~2 X-Git-Url: http://git.indexdata.com/?p=lui-solr3.git;a=commitdiff_plain;h=3ac2499d8b5a2e02241c0e8d0948d63b0444e5f6;ds=sidebyside New masterkey-lui-solr3 (split from masterkey-lui-solr) --- 3ac2499d8b5a2e02241c0e8d0948d63b0444e5f6 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4939ae9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ +data +install-stamp \ No newline at end of file diff --git a/IDMETA b/IDMETA new file mode 100644 index 0000000..59740d4 --- /dev/null +++ b/IDMETA @@ -0,0 +1,4 @@ +NAME=masterkey-lui-solr3 +VERSION=0.5.0 +DEBIAN_DIST="squeeze wheezy" +UBUNTU_DIST="" diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..d275d1b --- /dev/null +++ b/NEWS @@ -0,0 +1,15 @@ +LUI Solr +========================== +A Local Unified Index based on Solr. + +The following is a repackaging of Solr with a specific schema used in the +Library domain. The schema follows the pazpar2 data model used in many +library configuration and should be able to contain both MARC and Dublin Core +data. + +The LUI model extends the pazpar2 data model with concept of sub-database (or set), by +adding field database (and possible database_name) to the data. Data must not use these +fields for data. At some point it should be possible to configure which fields to use. + +In addition the field name "id" is defined as unique key to a record in the Solr index. +Adding a new record with the same id mean override the old record with new data. diff --git a/conf/admin-extra.html b/conf/admin-extra.html new file mode 100644 index 0000000..aa739da --- /dev/null +++ b/conf/admin-extra.html @@ -0,0 +1,31 @@ + + + diff --git a/conf/elevate.xml b/conf/elevate.xml new file mode 100644 index 0000000..7630ebe --- /dev/null +++ b/conf/elevate.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + diff --git a/conf/mapping-ISOLatin1Accent.txt b/conf/mapping-ISOLatin1Accent.txt new file mode 100644 index 0000000..ede7742 --- /dev/null +++ b/conf/mapping-ISOLatin1Accent.txt @@ -0,0 +1,246 @@ +# 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. + +# Syntax: +# "source" => "target" +# "source".length() > 0 (source cannot be empty.) +# "target".length() >= 0 (target can be empty.) + +# example: +# "À" => "A" +# "\u00C0" => "A" +# "\u00C0" => "\u0041" +# "ß" => "ss" +# "\t" => " " +# "\n" => "" + +# À => A +"\u00C0" => "A" + +# Á => A +"\u00C1" => "A" + +#  => A +"\u00C2" => "A" + +# à => A +"\u00C3" => "A" + +# Ä => A +"\u00C4" => "A" + +# Å => A +"\u00C5" => "A" + +# Æ => AE +"\u00C6" => "AE" + +# Ç => C +"\u00C7" => "C" + +# È => E +"\u00C8" => "E" + +# É => E +"\u00C9" => "E" + +# Ê => E +"\u00CA" => "E" + +# Ë => E +"\u00CB" => "E" + +# Ì => I +"\u00CC" => "I" + +# Í => I +"\u00CD" => "I" + +# Î => I +"\u00CE" => "I" + +# Ï => I +"\u00CF" => "I" + +# IJ => IJ +"\u0132" => "IJ" + +# Ð => D +"\u00D0" => "D" + +# Ñ => N +"\u00D1" => "N" + +# Ò => O +"\u00D2" => "O" + +# Ó => O +"\u00D3" => "O" + +# Ô => O +"\u00D4" => "O" + +# Õ => O +"\u00D5" => "O" + +# Ö => O +"\u00D6" => "O" + +# Ø => O +"\u00D8" => "O" + +# Œ => OE +"\u0152" => "OE" + +# Þ +"\u00DE" => "TH" + +# Ù => U +"\u00D9" => "U" + +# Ú => U +"\u00DA" => "U" + +# Û => U +"\u00DB" => "U" + +# Ü => U +"\u00DC" => "U" + +# Ý => Y +"\u00DD" => "Y" + +# Ÿ => Y +"\u0178" => "Y" + +# à => a +"\u00E0" => "a" + +# á => a +"\u00E1" => "a" + +# â => a +"\u00E2" => "a" + +# ã => a +"\u00E3" => "a" + +# ä => a +"\u00E4" => "a" + +# å => a +"\u00E5" => "a" + +# æ => ae +"\u00E6" => "ae" + +# ç => c +"\u00E7" => "c" + +# è => e +"\u00E8" => "e" + +# é => e +"\u00E9" => "e" + +# ê => e +"\u00EA" => "e" + +# ë => e +"\u00EB" => "e" + +# ì => i +"\u00EC" => "i" + +# í => i +"\u00ED" => "i" + +# î => i +"\u00EE" => "i" + +# ï => i +"\u00EF" => "i" + +# ij => ij +"\u0133" => "ij" + +# ð => d +"\u00F0" => "d" + +# ñ => n +"\u00F1" => "n" + +# ò => o +"\u00F2" => "o" + +# ó => o +"\u00F3" => "o" + +# ô => o +"\u00F4" => "o" + +# õ => o +"\u00F5" => "o" + +# ö => o +"\u00F6" => "o" + +# ø => o +"\u00F8" => "o" + +# œ => oe +"\u0153" => "oe" + +# ß => ss +"\u00DF" => "ss" + +# þ => th +"\u00FE" => "th" + +# ù => u +"\u00F9" => "u" + +# ú => u +"\u00FA" => "u" + +# û => u +"\u00FB" => "u" + +# ü => u +"\u00FC" => "u" + +# ý => y +"\u00FD" => "y" + +# ÿ => y +"\u00FF" => "y" + +# ff => ff +"\uFB00" => "ff" + +# fi => fi +"\uFB01" => "fi" + +# fl => fl +"\uFB02" => "fl" + +# ffi => ffi +"\uFB03" => "ffi" + +# ffl => ffl +"\uFB04" => "ffl" + +# ſt => ft +"\uFB05" => "ft" + +# st => st +"\uFB06" => "st" diff --git a/conf/protwords.txt b/conf/protwords.txt new file mode 100644 index 0000000..1dfc0ab --- /dev/null +++ b/conf/protwords.txt @@ -0,0 +1,21 @@ +# 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. + +#----------------------------------------------------------------------- +# Use a protected word file to protect against the stemmer reducing two +# unrelated words to the same base word. + +# Some non-words that normally won't be encountered, +# just to test that they won't be stemmed. +dontstems +zwhacky + diff --git a/conf/schema.xml b/conf/schema.xml new file mode 100644 index 0000000..fd85cfa --- /dev/null +++ b/conf/schema.xml @@ -0,0 +1,663 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + text + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/schema.xml.org b/conf/schema.xml.org new file mode 100644 index 0000000..82f4ba9 --- /dev/null +++ b/conf/schema.xml.org @@ -0,0 +1,569 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + text + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/scripts.conf b/conf/scripts.conf new file mode 100644 index 0000000..8360488 --- /dev/null +++ b/conf/scripts.conf @@ -0,0 +1,24 @@ +# 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. + +user= +solr_hostname=localhost +solr_port=8984 +rsyncd_port=18984 +data_dir= +webapp_name=solr +master_host= +master_data_dir= +master_status_dir= diff --git a/conf/solrconfig-devl.xml b/conf/solrconfig-devl.xml new file mode 100644 index 0000000..e47b03d --- /dev/null +++ b/conf/solrconfig-devl.xml @@ -0,0 +1,1491 @@ + + + + + + + + + ${solr.abortOnConfigurationError:true} + + + LUCENE_33 + + + + + + + + + + + + + + + + + ${solr.data.dir:/home/dennis/proj/lui-solr/data} + + + + + + + + + false + + 10 + + 32 + + + + 10000 + 1000 + 10000 + + + + + + + + + native + + + + + + + + + false + 32 + 10 + + + false + + + true + + + + + 1 + + 0 + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1024 + + + + + + + + + + + + + + + + + + + + + + true + + + + + + 20 + + + 200 + + + + + + + database:* + true + 1 + author_exact + subject_exact + medium_exact + date + database + + + + + + + database:* + true + 1 + author_exact + subject_exact + medium_exact + date + database + + + + + + false + + + 10 + + + + + + + + + + + + + + + + + + + + + + explicit + text + + false + + true + + 5 + true + + + spellcheck + + + + + + + explicit + + + velocity + + browse + layout + Solritas + + edismax + *:* + 10 + *,score + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + text,features,name,sku,id,manu,cat + 3 + + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + + on + cat + manu_exact + ipod + GB + 1 + cat,inStock + price + 0 + 600 + 50 + after + manufacturedate_dt + NOW/YEAR-10YEARS + NOW + +1YEAR + before + after + + + + on + text features name + 0 + name + + + spellcheck + + + + + + + + + + + + + + + + + + + + + + + text + true + ignored_ + + + true + links + ignored_ + + + + + + + + + + + + + + + + + + + + + search + solrpingquery + all + + + + + + + explicit + true + + + + + + + + + + + + text + + + solr.IndexBasedSpellChecker + text + text + true + ./spellchecker + + + + + + + + + + + + + + + + + + false + false + 1 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + default + + + org.carrot2.clustering.lingo.LingoClusteringAlgorithm + + + 20 + + + clustering/carrot2 + + + ENGLISH + + + stc + org.carrot2.clustering.stc.STCClusteringAlgorithm + + + + + + + true + default + true + + name + id + + features + + true + + + + false + + edismax + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + *:* + 10 + *,score + + + clustering + + + + + + + + + + true + + + terms + + + + + + + + string + elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\"']{20,200} + + + + + + + ]]> + ]]> + + + + + + + + + + + + + + + + + + + + + ,, + ,, + ,, + ,, + ,]]> + ]]> + + + + + + + + + + + + + + + + + + 5 + + + + + + + + + + + + + *:* + + + + + + diff --git a/conf/solrconfig-master.xml b/conf/solrconfig-master.xml new file mode 100644 index 0000000..1fa5c9d --- /dev/null +++ b/conf/solrconfig-master.xml @@ -0,0 +1,1494 @@ + + + + + + + + + ${solr.abortOnConfigurationError:true} + + + LUCENE_33 + + + + + + + + + + + + + + + + + ${solr.data.dir:/var/lib/masterkey/lui/solr/master} + + + + + + + + + false + + 10 + + 32 + + + + 10000 + 1000 + 10000 + + + + + + + + + native + + + + + + + + + false + 32 + 10 + + + false + + + true + + + + + 1 + + 0 + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1024 + + + + + + + + + + + + + + + + + + + + + + true + + + + + + 20 + + + 200 + + + + + + + database:* + true + 1 + author_exact + subject_exact + medium_exact + date + database + + + + + + + database:* + true + 1 + author_exact + subject_exact + medium_exact + date + database + + + + + + false + + + 2 + + + + + + + + + + + + + + + + + + + + + + explicit + text + + false + + true + + 5 + true + + + spellcheck + + + + + + + explicit + + + velocity + + browse + layout + Solritas + + edismax + *:* + 10 + *,score + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + text,features,name,sku,id,manu,cat + 3 + + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + + on + cat + manu_exact + ipod + GB + 1 + cat,inStock + price + 0 + 600 + 50 + after + manufacturedate_dt + NOW/YEAR-10YEARS + NOW + +1YEAR + before + after + + + + on + text features name + 0 + name + + + spellcheck + + + + + + + + + + + + + + + + + + + + + + + text + true + ignored_ + + + true + links + ignored_ + + + + + + + + + + + + + + + + + + + + + search + solrpingquery + all + + + + + + + explicit + true + + + + + + + + commit + startup + schema.xml,stopwords.txt + + + + + + + + + + + + text + + + solr.IndexBasedSpellChecker + text + text + true + ./spellchecker + + + + + + + + + + + + + + + + + + false + false + 1 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + default + + + org.carrot2.clustering.lingo.LingoClusteringAlgorithm + + + 20 + + + clustering/carrot2 + + + ENGLISH + + + stc + org.carrot2.clustering.stc.STCClusteringAlgorithm + + + + + + + true + default + true + + name + id + + features + + true + + + + false + + edismax + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + *:* + 10 + *,score + + + clustering + + + + + + + + + + true + + + terms + + + + + + + + string + elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\"']{20,200} + + + + + + + ]]> + ]]> + + + + + + + + + + + + + + + + + + + + + ,, + ,, + ,, + ,, + ,]]> + ]]> + + + + + + + + + + + + + + + + + + 5 + + + + + + + + + + + + + *:* + + + + + + diff --git a/conf/solrconfig-prod.xml b/conf/solrconfig-prod.xml new file mode 100644 index 0000000..00e4214 --- /dev/null +++ b/conf/solrconfig-prod.xml @@ -0,0 +1,1478 @@ + + + + + + + + + ${solr.abortOnConfigurationError:true} + + + LUCENE_33 + + + + + + + + + + + + + + + + + ${solr.data.dir:/var/lib/masterkey/lui/solr/data} + + + + + + + + + false + + 10 + + 32 + + + + 10000 + 1000 + 10000 + + + + + + + + + native + + + + + + + + + false + 32 + 10 + + + false + + + true + + + + + 1 + + 0 + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1024 + + + + + + + + + + + + + + + + + + + + + + true + + + + + + 20 + + + 200 + + + + + + + + + + + + static firstSearcher warming in solrconfig.xml + + + + + + false + + + 2 + + + + + + + + + + + + + + + + + + + + + + explicit + text + + false + + true + + 5 + true + + + spellcheck + + + + + + + explicit + + + velocity + + browse + layout + Solritas + + edismax + *:* + 10 + *,score + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + text,features,name,sku,id,manu,cat + 3 + + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + + on + cat + manu_exact + ipod + GB + 1 + cat,inStock + price + 0 + 600 + 50 + after + manufacturedate_dt + NOW/YEAR-10YEARS + NOW + +1YEAR + before + after + + + + on + text features name + 0 + name + + + spellcheck + + + + + + + + + + + + + + + + + + + + + + + text + true + ignored_ + + + true + links + ignored_ + + + + + + + + + + + + + + + + + + + + + search + solrpingquery + all + + + + + + + explicit + true + + + + + + + + + + + + text + + + solr.IndexBasedSpellChecker + text + text + true + ./spellchecker + + + + + + + + + + + + + + + + + + false + false + 1 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + default + + + org.carrot2.clustering.lingo.LingoClusteringAlgorithm + + + 20 + + + clustering/carrot2 + + + ENGLISH + + + stc + org.carrot2.clustering.stc.STCClusteringAlgorithm + + + + + + + true + default + true + + name + id + + features + + true + + + + false + + edismax + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + *:* + 10 + *,score + + + clustering + + + + + + + + + + true + + + terms + + + + + + + + string + elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\"']{20,200} + + + + + + + ]]> + ]]> + + + + + + + + + + + + + + + + + + + + + ,, + ,, + ,, + ,, + ,]]> + ]]> + + + + + + + + + + + + + + + + + + 5 + + + + + + + + + + + + + *:* + + + + + + diff --git a/conf/solrconfig-slave.xml b/conf/solrconfig-slave.xml new file mode 100644 index 0000000..62c7e01 --- /dev/null +++ b/conf/solrconfig-slave.xml @@ -0,0 +1,1493 @@ + + + + + + + + + ${solr.abortOnConfigurationError:true} + + + LUCENE_33 + + + + + + + + + + + + + + + + + ${solr.data.dir:/var/lib/masterkey/lui/solr/slave} + + + + + + + + + false + + 10 + + 32 + + + + 10000 + 1000 + 10000 + + + + + + + + + native + + + + + + + + + false + 32 + 10 + + + false + + + true + + + + + 1 + + 0 + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1024 + + + + + + + + + + + + + + + + + + + + + + true + + + + + + 20 + + + 200 + + + + + + + database:* + true + 1 + author_exact + subject_exact + medium_exact + date + database + + + + + + + database:* + true + 1 + author_exact + subject_exact + medium_exact + date + database + + + + + + false + + + 2 + + + + + + + + + + + + + + + + + + + + + + explicit + text + + false + + true + + 5 + true + + + spellcheck + + + + + + + explicit + + + velocity + + browse + layout + Solritas + + edismax + *:* + 10 + *,score + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + text,features,name,sku,id,manu,cat + 3 + + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + + on + cat + manu_exact + ipod + GB + 1 + cat,inStock + price + 0 + 600 + 50 + after + manufacturedate_dt + NOW/YEAR-10YEARS + NOW + +1YEAR + before + after + + + + on + text features name + 0 + name + + + spellcheck + + + + + + + + + + + + + + + + + + + + + + + text + true + ignored_ + + + true + links + ignored_ + + + + + + + + + + + + + + + + + + + + + search + solrpingquery + all + + + + + + + explicit + true + + + + + + + + + http://localhost:8983/solr/replication + 00:00:60 + + + + + + + + + + text + + + solr.IndexBasedSpellChecker + text + text + true + ./spellchecker + + + + + + + + + + + + + + + + + + false + false + 1 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + default + + + org.carrot2.clustering.lingo.LingoClusteringAlgorithm + + + 20 + + + clustering/carrot2 + + + ENGLISH + + + stc + org.carrot2.clustering.stc.STCClusteringAlgorithm + + + + + + + true + default + true + + name + id + + features + + true + + + + false + + edismax + + text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 + + *:* + 10 + *,score + + + clustering + + + + + + + + + + true + + + terms + + + + + + + + string + elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\"']{20,200} + + + + + + + ]]> + ]]> + + + + + + + + + + + + + + + + + + + + + ,, + ,, + ,, + ,, + ,]]> + ]]> + + + + + + + + + + + + + + + + + + 5 + + + + + + + + + + + + + *:* + + + + + + diff --git a/conf/solrconfig.xml b/conf/solrconfig.xml new file mode 120000 index 0000000..4ef2084 --- /dev/null +++ b/conf/solrconfig.xml @@ -0,0 +1 @@ +solrconfig-devl.xml \ No newline at end of file diff --git a/conf/spellings.txt b/conf/spellings.txt new file mode 100644 index 0000000..d7ede6f --- /dev/null +++ b/conf/spellings.txt @@ -0,0 +1,2 @@ +pizza +history \ No newline at end of file diff --git a/conf/stopwords.txt b/conf/stopwords.txt new file mode 100644 index 0000000..b5824da --- /dev/null +++ b/conf/stopwords.txt @@ -0,0 +1,58 @@ +# 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 +s +such +t +that +the +their +then +there +these +they +this +to +was +will +with + diff --git a/conf/synonyms.txt b/conf/synonyms.txt new file mode 100644 index 0000000..b0e31cb --- /dev/null +++ b/conf/synonyms.txt @@ -0,0 +1,31 @@ +# 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. + +#----------------------------------------------------------------------- +#some test synonym mappings unlikely to appear in real input text +aaa => aaaa +bbb => bbbb1 bbbb2 +ccc => cccc1,cccc2 +a\=>a => b\=>b +a\,a => b\,b +fooaaa,baraaa,bazaaa + +# Some synonym groups specific to this example +GB,gib,gigabyte,gigabytes +MB,mib,megabyte,megabytes +Television, Televisions, TV, TVs +#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming +#after us won't split it into two words. + +# Synonym mappings can be used for spelling correction too +pixima => pixma + diff --git a/conf/xslt/example.xsl b/conf/xslt/example.xsl new file mode 100644 index 0000000..6832a1d --- /dev/null +++ b/conf/xslt/example.xsl @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + <xsl:value-of select="$title"/> + + + +

+
+ This has been formatted by the sample "example.xsl" transform - + use your own XSLT to get a nicer page +
+ + + +
+ + + +
+ + + + +
+
+
+ + + + + + + + + + + + + + javascript:toggle("");? +
+ + exp + + + + + +
+ + +
+ + + + + + + +
    + +
  • +
    +
+ + +
+ + + + + + + + + + + + + + + + + + + + +
diff --git a/conf/xslt/example_atom.xsl b/conf/xslt/example_atom.xsl new file mode 100644 index 0000000..e1c7d5a --- /dev/null +++ b/conf/xslt/example_atom.xsl @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + Example Solr Atom 1.0 Feed + + This has been formatted by the sample "example_atom.xsl" transform - + use your own XSLT to get a nicer Atom feed. + + + Apache Solr + solr-user@lucene.apache.org + + + + + + tag:localhost,2007:example + + + + + + + + + <xsl:value-of select="str[@name='name']"/> + + tag:localhost,2007: + + + + + + diff --git a/conf/xslt/example_rss.xsl b/conf/xslt/example_rss.xsl new file mode 100644 index 0000000..3e09e65 --- /dev/null +++ b/conf/xslt/example_rss.xsl @@ -0,0 +1,66 @@ + + + + + + + + + + + + + Example Solr RSS 2.0 Feed + http://localhost:8983/solr + + This has been formatted by the sample "example_rss.xsl" transform - + use your own XSLT to get a nicer RSS feed. + + en-us + http://localhost:8983/solr + + + + + + + + + + + <xsl:value-of select="str[@name='name']"/> + + http://localhost:8983/solr/select?q=id: + + + + + + + http://localhost:8983/solr/select?q=id: + + + + diff --git a/conf/xslt/luke.xsl b/conf/xslt/luke.xsl new file mode 100644 index 0000000..6e9a064 --- /dev/null +++ b/conf/xslt/luke.xsl @@ -0,0 +1,337 @@ + + + + + + + + + Solr Luke Request Handler Response + + + + + + + + + <xsl:value-of select="$title"/> + + + + + +

+ +

+
+ +
+ +

Index Statistics

+ +
+ +

Field Statistics

+ + + +

Document statistics

+ + + + +
+ + + + + +
+ +
+ + +
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+

+ +

+ +
+ +
+
+
+ + +
+ + 50 + 800 + 160 + blue + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ background-color: ; width: px; height: px; +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
  • + +
  • +
    +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + + + + + + + + + + + + + + + + +
diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..e437d9f --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,4 @@ +files +masterkey-*/ +*.substvars +*.log diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..6cf3a12 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +masterkey-lui-solr3 (0.5.0-1indexdata) unstable; urgency=low + + * Upstream + + -- Dennis Schafroth Tue, 20 Aug 2013 13:24:28 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..45ffd62 --- /dev/null +++ b/debian/control @@ -0,0 +1,48 @@ +Source: masterkey-lui-solr3 +Section: misc +Priority: extra +Maintainer: dennis +Build-Depends: debhelper (>= 5), default-jdk, maven2, unzip +Standards-Version: 3.8.0 +Homepage: http://www.indexdata.dk/masterkey/harvester + +Package: masterkey-lui-solr3-common +Architecture: all +Depends: +Conficts: masterkey-lui-solr-common +Replaces: masterkey-lui-solr-common +Description: The Solr Web Application in war format. + The Solr 3 Web Application is a Web service for indexing. + +Package: masterkey-lui-solr3-master +Architecture: all +Depends: masterkey-lui-solr3-common +Conficts: masterkey-lui-solr-master +Replaces: masterkey-lui-solr-master +Description: Local Unified Index (Solr) + The Local Unified Index is a index that contains multiple logical indexes (subdatabases). The underlying index is a Solr/lucene index configured to use a specific LUI schema. + +Package: masterkey-lui-solr3-slave +Architecture: all +Depends: masterkey-lui-solr3-common +Conficts: masterkey-lui-solr-slave +Replaces: masterkey-lui-solr-slave +Description: Local Unified Index (Solr) + The Local Unified Index is a index that contains multiple logical indexes (subdatabases). The underlying index is a Solr/lucene index configured to use a specific LUI schema. This has configuration for being a slave replicated for a master + +Package: masterkey-lui-solr3-master-tomcat6 +Architecture: all +Depends: tomcat6, masterkey-lui-solr3-master +Conficts: masterkey-lui-solr-master-tomcat6 +Replaces: masterkey-lui-solr3-master-tomcat6 +Description: Local Unified Index Solr Tomcat 6 integration for a LUI master + The LUI is part of the MasterKey suite. This package provides Tomcat 6 integration. + +Package: masterkey-lui-solr3-slave-tomcat6 +Architecture: all +Depends: tomcat6,masterkey-lui-solr3-slave +Conficts: masterkey-lui-solr-slave-tomcat6 +Replaces: masterkey-lui-solr-slave-tomcat6 +Description: Local Unified Index Solr Tomcat 6 integration for a LUI master + The LUI is part of the MasterKey suite. This package provides Tomcat 6 integration. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..b5fb090 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +This package was debianized by the alien program by converting +a binary .rpm package on Tue, 29 Jan 2013 15:03:38 +0100 + +Copyright: IndexData + +Information from the binary package: +Name : masterkey-lui-solr +Version : 0.2.2 +Release : 1.indexdata +Architecture: noarch +Install Date: (not installed) +Group : Applications/Internet +Size : 7603954 +License : IndexData +Signature : DSA/SHA1, Wed 02 Nov 2011 03:39:39 PM CET, Key ID 38e53a727f1d2347 +Source RPM : masterkey-lui-solr-0.2.2-1.indexdata.src.rpm +Build Date : Wed 02 Nov 2011 03:35:41 PM CET +Build Host : centos5.index +Relocations : (not relocatable) +Packager : Dennis Schafroth +Vendor : Index Data ApS +URL : http://www.indexdata.dk/masterkey +Summary : Local Unified Index (Solr) +Description : +The Local Unified Index is a index that contains multiple logical indexes. The underlying index is a Solr/lucene index configured to use a specific LUI schema. + diff --git a/debian/masterkey-lui-solr-master-tomcat6.postinst b/debian/masterkey-lui-solr-master-tomcat6.postinst new file mode 100644 index 0000000..9b4ba0a --- /dev/null +++ b/debian/masterkey-lui-solr-master-tomcat6.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +ln -sf /etc/masterkey/lui/lui-solr-master.xml /etc/tomcat6/Catalina/localhost/solr.xml +chown -R tomcat6:tomcat6 /var/lib/masterkey/lui/solr/master diff --git a/debian/masterkey-lui-solr-master-tomcat6.postrm b/debian/masterkey-lui-solr-master-tomcat6.postrm new file mode 100644 index 0000000..8b3502e --- /dev/null +++ b/debian/masterkey-lui-solr-master-tomcat6.postrm @@ -0,0 +1,18 @@ +#!/bin/sh -e + +case "$1" in + purge|remove) + rm -f /etc/tomcat6/Catalina/localhost/solr.xml +# rm -f /etc/tomcat6/policy.d/05harvester.policy + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/masterkey-lui-solr-slave-tomcat6.postinst b/debian/masterkey-lui-solr-slave-tomcat6.postinst new file mode 100644 index 0000000..a647647 --- /dev/null +++ b/debian/masterkey-lui-solr-slave-tomcat6.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +ln -sf /etc/masterkey/lui/lui-solr-slave.xml /etc/tomcat6/Catalina/localhost/solr-slave.xml +chown -R tomcat6:tomcat6 /var/lib/masterkey/lui/solr/slave diff --git a/debian/masterkey-lui-solr-slave-tomcat6.postrm b/debian/masterkey-lui-solr-slave-tomcat6.postrm new file mode 100644 index 0000000..2c4542a --- /dev/null +++ b/debian/masterkey-lui-solr-slave-tomcat6.postrm @@ -0,0 +1,18 @@ +#!/bin/sh -e + +case "$1" in + purge|remove) + rm -f /etc/tomcat6/Catalina/localhost/solr-slave.xml +# rm -f /etc/tomcat6/policy.d/05harvester.policy + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/masterkey-lui-solr-slave.postinst b/debian/masterkey-lui-solr-slave.postinst new file mode 100644 index 0000000..fbd28f7 --- /dev/null +++ b/debian/masterkey-lui-solr-slave.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +# alien added permissions fixup code +#chown -R 'tomcat6:tomcat6' '/usr/share/masterkey/lui/solr/slave' diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..123b4e9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,109 @@ +#!/usr/bin/make -f +# debian/rules for alien + +BASE=masterkey-lui-solr3 +BASE_TOMCAT=$(BASE)-tomcat +BASE_SLAVE=$(BASE)-slave +BASE_SLAVE_TOMCAT=$(BASE_SLAVE)-tomcat + +DOC = /usr/share/doc/masterkey +LOG = /var/log/masterkey +SHARE = /usr/share/masterkey/lui/solr + +CONF_MASTER = $(SHARE)/master +CONF_SLAVE = $(SHARE)/slave + +DATA = /var/lib/masterkey/lui/solr +DATA_MASTER = $(DATA)/master +DATA_SLAVE = $(DATA)/slave + +LUI_SOLR_COMMON = $(BASE)-common +LUI_SOLR_COMMON_ROOT = $(CURDIR)/debian/$(LUI_SOLR_COMMON) +LUI_SOLR_COMMON_DIR = $(LUI_SOLR_COMMON_ROOT)$(SHARE)/war + +LUI_SOLR_MASTER = $(BASE)-master +LUI_SOLR_MASTER_ROOT = $(CURDIR)/debian/$(LUI_SOLR_MASTER) +LUI_SOLR_MASTER_SHARE_DIR = $(LUI_SOLR_MASTER_ROOT)$(CONF_MASTER) +LUI_SOLR_MASTER_LIB_DIR = $(LUI_SOLR_MASTER_ROOT)$(DATA_MASTER) + +LUI_SOLR_MASTER_TOMCAT = $(LUI_SOLR_MASTER)-tomcat +LUI_SOLR_MASTER_TOMCAT_ROOT = $(CURDIR)/debian/$(LUI_SOLR_MASTER_TOMCAT) + +LUI_SOLR_SLAVE = $(BASE)-slave +LUI_SOLR_SLAVE_ROOT = $(CURDIR)/debian/$(LUI_SOLR_SLAVE) +LUI_SOLR_SLAVE_SHARE_DIR = $(LUI_SOLR_SLAVE_ROOT)$(CONF_SLAVE) +LUI_SOLR_SLAVE_LIB_DIR = $(LUI_SOLR_SLAVE_ROOT)$(DATA_SLAVE) + +LUI_SOLR_SLAVE_TOMCAT = $(LUI)-slave-tomcat +LUI_SOLR_SLAVE_TOMCAT_ROOT = $(CURDIR)/debian/$(LUI_SLAVE_TOMCAT) +#LUI_SOLR_SHARE = $(LUI_SLAVE_TOMCAT_ROOT)/usr/share/masterkey/$(LUI_SLAVE_TOMCAT) + +SOLR_VERSION=3.6.1 + +PACKAGE=$(shell dh_listpackages) + +build: + dh_testdir + +clean: + dh_testdir + dh_testroot + dh_clean -d + + +install: install-stamp +install-stamp: build + dh_testdir + dh_testroot + dh_prep + + # lui-solr-common. Install a Solr WAR. + mkdir -p $(LUI_SOLR_COMMON_DIR) + cp dist/apache-solr-$(SOLR_VERSION).war -d $(LUI_SOLR_COMMON_DIR) + + # lui-solr-master + mkdir -p $(LUI_SOLR_MASTER_SHARE_DIR) + cp -rp conf $(LUI_SOLR_MASTER_SHARE_DIR) + ln -sf solrconfig-master.xml $(LUI_SOLR_MASTER_SHARE_DIR)/conf/solrconfig.xml + mkdir -p $(LUI_SOLR_MASTER_LIB_DIR) + + # lui-solr-slave Slave configuration + mkdir -p $(LUI_SOLR_SLAVE_SHARE_DIR) + cp -rp conf $(LUI_SOLR_SLAVE_SHARE_DIR) + ln -sf solrconfig-slave.xml $(LUI_SOLR_SLAVE_SHARE_DIR)/conf/solrconfig.xml + mkdir -p $(LUI_SOLR_SLAVE_LIB_DIR) + + # lui-solr-master plumbing for Tomcat 6. + mkdir -p $(LUI_SOLR_MASTER_ROOT)/etc/masterkey/lui + cp etc/solr-tomcat-context-master.xml $(LUI_SOLR_MASTER_ROOT)/etc/masterkey/lui/lui-solr-master.xml +# mkdir -p $(TOMCAT6ROOT)/var/log/masterkey/lui + + # lui-solr-slave plumbing for Tomcat 6 + mkdir -p $(LUI_SOLR_SLAVE_ROOT)/etc/masterkey/lui + cp etc/solr-tomcat-context-slave.xml $(LUI_SOLR_SLAVE_ROOT)/etc/masterkey/lui/lui-solr-slave.xml +# mkdir -p $(TOMCAT6ROOT)/var/log/masterkey/lui + + touch $@ + +binary: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installchangelogs + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Copy the packages's files. +# find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \ +# xargs -0 -r -i cp -a {} debian/$(PACKAGE) +# +# +# If you need to move files around in debian/$(PACKAGE) or do some +# binary patching, do it here +# + +.PHONY: build clean binary-indep binary-arch binary diff --git a/dist/apache-solr-3.3.0.war b/dist/apache-solr-3.3.0.war new file mode 100644 index 0000000..6a3d291 Binary files /dev/null and b/dist/apache-solr-3.3.0.war differ diff --git a/dist/apache-solr-3.6.1.war b/dist/apache-solr-3.6.1.war new file mode 100644 index 0000000..2ee6bbe Binary files /dev/null and b/dist/apache-solr-3.6.1.war differ diff --git a/dist/apache-solr-3.6.2.war b/dist/apache-solr-3.6.2.war new file mode 100644 index 0000000..8144c41 Binary files /dev/null and b/dist/apache-solr-3.6.2.war differ diff --git a/etc/solr-devl.xml b/etc/solr-devl.xml new file mode 100644 index 0000000..2f865c7 --- /dev/null +++ b/etc/solr-devl.xml @@ -0,0 +1,6 @@ + + + + diff --git a/etc/solr-tomcat-context-master.xml b/etc/solr-tomcat-context-master.xml new file mode 100644 index 0000000..4fb8682 --- /dev/null +++ b/etc/solr-tomcat-context-master.xml @@ -0,0 +1,7 @@ + + + + diff --git a/etc/solr-tomcat-context-slave.xml b/etc/solr-tomcat-context-slave.xml new file mode 100644 index 0000000..a5c521b --- /dev/null +++ b/etc/solr-tomcat-context-slave.xml @@ -0,0 +1,7 @@ + + + + diff --git a/etc/solr-tomcat-context.xml b/etc/solr-tomcat-context.xml new file mode 100644 index 0000000..d009dd3 --- /dev/null +++ b/etc/solr-tomcat-context.xml @@ -0,0 +1,7 @@ + + + + diff --git a/lui-solr.spec b/lui-solr.spec new file mode 100644 index 0000000..b78551c --- /dev/null +++ b/lui-solr.spec @@ -0,0 +1,80 @@ +Summary: Local Unified Index (Solr) +Name: masterkey-lui-solr +Version: 0.3.0 +Release: 1.indexdata +License: IndexData +Group: Applications/Internet +Vendor: Index Data ApS +Source: masterkey-lui-solr-%{version}.tar.gz +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Packager: Dennis Schafroth +URL: http://www.indexdata.dk/masterkey + +%description +The Local Unified Index is a index that contains multiple logical indexes. The underlying index is a Solr/lucene index configured to use a specific LUI schema. + +%package -n masterkey-lui-solr-tomcat +Summary: Local Unified Index Solr Tomcat +Requires: masterkey-lui-solr +Group: Applications/Internet + +%package -n masterkey-lui-solr-tomcat6 +Summary: Local Unified Index Solr Tomcat 6 integration +Requires: tomcat6 masterkey-lui-solr-tomcat +Group: Applications/Internet + +#%description -n masterkey-lui-solr-initd +#The LUI is the stand-alone Solr/Lucene Index with the LUI schema + +%description -n masterkey-lui-solr-tomcat +The LUI Tomcat is part of the MasterKey suite. This package provides the LUI Tomcat context + +%description -n masterkey-lui-solr-tomcat6 +The LUI is part of the MasterKey suite. This package provides Tomcat 6 integration. + +%prep +%setup +%build + +%install +mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/war +cp -a dist/* ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/war +mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/conf +cp -a solr-conf/* ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/conf + +mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/lui/solr +# cp -a etc/harvester.properties ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/lui/solr + +#mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/log/masterkey/lui/solr +mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/lib/masterkey/lui/solr/data + +#tomcat context +sed -e 's@docBase=".*"@docBase="%{_datadir}\/masterkey\/lui\/solr\/war\/apache-solr-3.3.0.war"@g' etc/solr-tomcat-context.xml > ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/lui/solr/lui-solr-context.xml + +# Solr config +sed -e 's@${solr.data.dir:.*}@${solr.data.dir:%{_localstatedir}\/lib\/masterkey\/lui\/solr\/data}@g' solr-conf/solrconfig.xml > ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/conf/solrconfig.xml + +%clean +rm -fr ${RPM_BUILD_ROOT} + +%post -n masterkey-lui-solr-tomcat6 +ln -sf %{_sysconfdir}/masterkey/lui/solr/lui-solr-context.xml %{_sysconfdir}/tomcat6/Catalina/localhost/lui-solr.xml + +%postun -n masterkey-lui-solr-tomcat6 +if [ $1 = 0 ]; then + rm -rf %{_sysconfdir}/tomcat6/Catalina/localhost/lui-solr.xml +fi + +%files +%defattr(755,tomcat,tomcat) +%{_datadir}/masterkey/lui/solr +%{_localstatedir}/lib/masterkey/lui/solr +%{_localstatedir}/lib/masterkey/lui/solr/data +%attr(755,tomcat,tomcat) %dir %{_localstatedir}/lib/masterkey/lui/solr + +%files -n masterkey-lui-solr-tomcat +%defattr(-,root,root) +%config %{_sysconfdir}/masterkey/lui/solr/lui-solr-context.xml + +%files -n masterkey-lui-solr-tomcat6 diff --git a/scripts/commit_solr.sh b/scripts/commit_solr.sh new file mode 100644 index 0000000..0cb3a43 --- /dev/null +++ b/scripts/commit_solr.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ "$1" == "" ] ; then + echo "No database id given" + exit 1 ; +fi +HOST=localhost +PORT=8080 +curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '' \ No newline at end of file diff --git a/scripts/delete_solr.sh b/scripts/delete_solr.sh new file mode 100755 index 0000000..2b91d65 --- /dev/null +++ b/scripts/delete_solr.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ "$1" == "" ] ; then + echo "$0 databaseid [HOST:PORT] " + exit 1 ; +fi +HOSTPORT="localhost:8080" + +if [ "$2" != "" ] ; then + HOSTPORT="$2" +fi + +curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary "database:$1" +curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary '' diff --git a/scripts/optimize_solr.sh b/scripts/optimize_solr.sh new file mode 100755 index 0000000..90d9a26 --- /dev/null +++ b/scripts/optimize_solr.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ "$1" != "YES" ] ; then + echo "No confirmation given" + exit 1 ; +fi +HOST=localhost +PORT=8080 +curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '' \ No newline at end of file