Skip to content

Commit

Permalink
Use solrwrapper for Solr 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Feb 23, 2015
1 parent 6c40a3b commit 0d851ef
Show file tree
Hide file tree
Showing 19 changed files with 2,140 additions and 21 deletions.
2 changes: 1 addition & 1 deletion blacklight.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |s|
s.add_dependency "bootstrap-sass", "~> 3.2"
s.add_dependency "deprecation"

s.add_development_dependency "jettywrapper", ">= 1.7.0"
s.add_development_dependency "solr_wrapper"
s.add_development_dependency "blacklight-marc", "~> 5.0"
s.add_development_dependency "rspec-rails", "~> 3.0"
s.add_development_dependency "rspec-its"
Expand Down
2 changes: 1 addition & 1 deletion lib/blacklight/solr_response/spelling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def words
# suggestion => [{ frequency =>, word => }] # for extended results
# suggestion => ['word'] # for non-extended results
origFreq = term_info['origFreq']
if suggestions.index("correctlySpelled")
if term_info['suggestion'].first.is_a?(Hash) or suggestions.index("correctlySpelled")
word_suggestions << term_info['suggestion'].map do |suggestion|
suggestion['word'] if suggestion['freq'] > origFreq
end
Expand Down
3 changes: 3 additions & 0 deletions solr/conf/_rest_managed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"initArgs":{},
"managedList":[]}
31 changes: 31 additions & 0 deletions solr/conf/admin-extra.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
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.
-->

<!-- The content of this page will be statically included into the top
of the admin page. Uncomment this as an example to see there the content
will show up.
<hr>
<i>This line will appear before the first table</i>
<tr>
<td colspan="2">
This row will be appended to the end of the first table
</td>
</tr>
<hr>
-->
36 changes: 36 additions & 0 deletions solr/conf/elevate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
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.
-->

<!-- If this file is found in the config directory, it will only be
loaded once at startup. If it is found in Solr's data
directory, it will be re-loaded every commit.
-->

<elevate>
<query text="foo bar">
<doc id="1" />
<doc id="2" />
<doc id="3" />
</query>

<query text="ipod">
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
</query>

</elevate>
246 changes: 246 additions & 0 deletions solr/conf/mapping-ISOLatin1Accent.txt
Original file line number Diff line number Diff line change
@@ -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
"\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
"\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
"\uFB00" => "ff"

# ??? => fi
"\uFB01" => "fi"

# ??? => fl
"\uFB02" => "fl"

# ??? => ffi
"\uFB03" => "ffi"

# ??? => ffl
"\uFB04" => "ffl"

# ??? => ft
"\uFB05" => "ft"

# ??? => st
"\uFB06" => "st"
21 changes: 21 additions & 0 deletions solr/conf/protwords.txt
Original file line number Diff line number Diff line change
@@ -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

Loading

0 comments on commit 0d851ef

Please sign in to comment.