rere 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. data/.classpath +260 -0
  2. data/.gitignore +28 -0
  3. data/.project +14 -0
  4. data/.ruby-version +1 -0
  5. data/.settings/org.eclim.prefs +3 -0
  6. data/.settings/org.eclipse.jdt.core.prefs +5 -0
  7. data/.settings/org.eclipse.jdt.ui.prefs +2 -0
  8. data/Gemfile +7 -0
  9. data/LICENSE +22 -0
  10. data/README.md +44 -0
  11. data/Rakefile +65 -0
  12. data/bin/solr +61 -0
  13. data/example/config/solr.yml +23 -0
  14. data/example/log/.gitkeep +0 -0
  15. data/example/solr/README.txt +63 -0
  16. data/example/solr/collection1/README.txt +50 -0
  17. data/example/solr/collection1/conf/admin-extra.html +24 -0
  18. data/example/solr/collection1/conf/admin-extra.menu-bottom.html +25 -0
  19. data/example/solr/collection1/conf/admin-extra.menu-top.html +25 -0
  20. data/example/solr/collection1/conf/currency.xml +67 -0
  21. data/example/solr/collection1/conf/elevate.xml +38 -0
  22. data/example/solr/collection1/conf/lang/contractions_ca.txt +8 -0
  23. data/example/solr/collection1/conf/lang/contractions_fr.txt +15 -0
  24. data/example/solr/collection1/conf/lang/contractions_ga.txt +5 -0
  25. data/example/solr/collection1/conf/lang/contractions_it.txt +23 -0
  26. data/example/solr/collection1/conf/lang/hyphenations_ga.txt +5 -0
  27. data/example/solr/collection1/conf/lang/stemdict_nl.txt +6 -0
  28. data/example/solr/collection1/conf/lang/stoptags_ja.txt +420 -0
  29. data/example/solr/collection1/conf/lang/stopwords_ar.txt +125 -0
  30. data/example/solr/collection1/conf/lang/stopwords_bg.txt +193 -0
  31. data/example/solr/collection1/conf/lang/stopwords_ca.txt +220 -0
  32. data/example/solr/collection1/conf/lang/stopwords_cz.txt +172 -0
  33. data/example/solr/collection1/conf/lang/stopwords_da.txt +108 -0
  34. data/example/solr/collection1/conf/lang/stopwords_de.txt +292 -0
  35. data/example/solr/collection1/conf/lang/stopwords_el.txt +78 -0
  36. data/example/solr/collection1/conf/lang/stopwords_en.txt +54 -0
  37. data/example/solr/collection1/conf/lang/stopwords_es.txt +354 -0
  38. data/example/solr/collection1/conf/lang/stopwords_eu.txt +99 -0
  39. data/example/solr/collection1/conf/lang/stopwords_fa.txt +313 -0
  40. data/example/solr/collection1/conf/lang/stopwords_fi.txt +95 -0
  41. data/example/solr/collection1/conf/lang/stopwords_fr.txt +184 -0
  42. data/example/solr/collection1/conf/lang/stopwords_ga.txt +110 -0
  43. data/example/solr/collection1/conf/lang/stopwords_gl.txt +161 -0
  44. data/example/solr/collection1/conf/lang/stopwords_hi.txt +235 -0
  45. data/example/solr/collection1/conf/lang/stopwords_hu.txt +209 -0
  46. data/example/solr/collection1/conf/lang/stopwords_hy.txt +46 -0
  47. data/example/solr/collection1/conf/lang/stopwords_id.txt +359 -0
  48. data/example/solr/collection1/conf/lang/stopwords_it.txt +301 -0
  49. data/example/solr/collection1/conf/lang/stopwords_ja.txt +127 -0
  50. data/example/solr/collection1/conf/lang/stopwords_lv.txt +172 -0
  51. data/example/solr/collection1/conf/lang/stopwords_nl.txt +117 -0
  52. data/example/solr/collection1/conf/lang/stopwords_no.txt +192 -0
  53. data/example/solr/collection1/conf/lang/stopwords_pt.txt +251 -0
  54. data/example/solr/collection1/conf/lang/stopwords_ro.txt +233 -0
  55. data/example/solr/collection1/conf/lang/stopwords_ru.txt +241 -0
  56. data/example/solr/collection1/conf/lang/stopwords_sv.txt +131 -0
  57. data/example/solr/collection1/conf/lang/stopwords_th.txt +119 -0
  58. data/example/solr/collection1/conf/lang/stopwords_tr.txt +212 -0
  59. data/example/solr/collection1/conf/lang/userdict_ja.txt +29 -0
  60. data/example/solr/collection1/conf/mapping-FoldToASCII.txt +3813 -0
  61. data/example/solr/collection1/conf/mapping-ISOLatin1Accent.txt +246 -0
  62. data/example/solr/collection1/conf/protwords.txt +21 -0
  63. data/example/solr/collection1/conf/schema.xml +1125 -0
  64. data/example/solr/collection1/conf/scripts.conf +24 -0
  65. data/example/solr/collection1/conf/solrconfig.xml +1816 -0
  66. data/example/solr/collection1/conf/spellings.txt +2 -0
  67. data/example/solr/collection1/conf/stopwords.txt +14 -0
  68. data/example/solr/collection1/conf/synonyms.txt +29 -0
  69. data/example/solr/collection1/conf/update-script.js +53 -0
  70. data/example/solr/collection1/conf/velocity/VM_global_library.vm +170 -0
  71. data/example/solr/collection1/conf/velocity/browse.vm +50 -0
  72. data/example/solr/collection1/conf/velocity/cluster.vm +9 -0
  73. data/example/solr/collection1/conf/velocity/clusterResults.vm +12 -0
  74. data/example/solr/collection1/conf/velocity/debug.vm +17 -0
  75. data/example/solr/collection1/conf/velocity/did_you_mean.vm +4 -0
  76. data/example/solr/collection1/conf/velocity/facet_fields.vm +15 -0
  77. data/example/solr/collection1/conf/velocity/facet_pivot.vm +3 -0
  78. data/example/solr/collection1/conf/velocity/facet_queries.vm +3 -0
  79. data/example/solr/collection1/conf/velocity/facet_ranges.vm +15 -0
  80. data/example/solr/collection1/conf/velocity/facets.vm +5 -0
  81. data/example/solr/collection1/conf/velocity/footer.vm +17 -0
  82. data/example/solr/collection1/conf/velocity/head.vm +32 -0
  83. data/example/solr/collection1/conf/velocity/header.vm +3 -0
  84. data/example/solr/collection1/conf/velocity/hit.vm +11 -0
  85. data/example/solr/collection1/conf/velocity/hitGrouped.vm +24 -0
  86. data/example/solr/collection1/conf/velocity/join-doc.vm +4 -0
  87. data/example/solr/collection1/conf/velocity/jquery.autocomplete.css +48 -0
  88. data/example/solr/collection1/conf/velocity/jquery.autocomplete.js +763 -0
  89. data/example/solr/collection1/conf/velocity/layout.vm +20 -0
  90. data/example/solr/collection1/conf/velocity/main.css +208 -0
  91. data/example/solr/collection1/conf/velocity/product-doc.vm +27 -0
  92. data/example/solr/collection1/conf/velocity/query.vm +42 -0
  93. data/example/solr/collection1/conf/velocity/queryGroup.vm +19 -0
  94. data/example/solr/collection1/conf/velocity/querySpatial.vm +40 -0
  95. data/example/solr/collection1/conf/velocity/richtext-doc.vm +114 -0
  96. data/example/solr/collection1/conf/velocity/suggest.vm +3 -0
  97. data/example/solr/collection1/conf/velocity/tabs.vm +6 -0
  98. data/example/solr/collection1/conf/xslt/example.xsl +132 -0
  99. data/example/solr/collection1/conf/xslt/example_atom.xsl +67 -0
  100. data/example/solr/collection1/conf/xslt/example_rss.xsl +66 -0
  101. data/example/solr/collection1/conf/xslt/luke.xsl +337 -0
  102. data/example/solr/collection1/conf/xslt/updateXml.xsl +70 -0
  103. data/example/solr/collection1/data/index/segments.gen +0 -0
  104. data/example/solr/collection1/data/index/segments_1 +0 -0
  105. data/example/solr/data/development/index/segments.gen +0 -0
  106. data/example/solr/data/development/index/segments_1 +0 -0
  107. data/example/solr/solr.xml +53 -0
  108. data/example/solr/zoo.cfg +17 -0
  109. data/lib/rere.rb +66 -0
  110. data/lib/rere/railtie.rb +8 -0
  111. data/lib/rere/server.rb +380 -0
  112. data/lib/rere/tasks/solr.rake +47 -0
  113. data/lib/rere/version.rb +3 -0
  114. data/pom.xml +168 -0
  115. data/rere.gemspec +26 -0
  116. data/server/README.txt +78 -0
  117. data/server/cloud-scripts/zkcli.bat +12 -0
  118. data/server/cloud-scripts/zkcli.sh +14 -0
  119. data/server/contexts/solr-jetty-context.xml +8 -0
  120. data/server/etc/create-solrtest.keystore.sh +37 -0
  121. data/server/etc/jetty.xml +205 -0
  122. data/server/etc/logging.properties +38 -0
  123. data/server/etc/solrtest.keystore +0 -0
  124. data/server/etc/webdefault.xml +527 -0
  125. data/server/exampledocs/books.csv +11 -0
  126. data/server/exampledocs/books.json +51 -0
  127. data/server/exampledocs/gb18030-example.xml +32 -0
  128. data/server/exampledocs/hd.xml +56 -0
  129. data/server/exampledocs/ipod_other.xml +60 -0
  130. data/server/exampledocs/ipod_video.xml +40 -0
  131. data/server/exampledocs/manufacturers.xml +75 -0
  132. data/server/exampledocs/mem.xml +77 -0
  133. data/server/exampledocs/money.xml +65 -0
  134. data/server/exampledocs/monitor.xml +35 -0
  135. data/server/exampledocs/monitor2.xml +34 -0
  136. data/server/exampledocs/mp500.xml +43 -0
  137. data/server/exampledocs/post.jar +0 -0
  138. data/server/exampledocs/post.sh +30 -0
  139. data/server/exampledocs/sd500.xml +38 -0
  140. data/server/exampledocs/solr.xml +38 -0
  141. data/server/exampledocs/test_utf8.sh +93 -0
  142. data/server/exampledocs/utf8-example.xml +42 -0
  143. data/server/exampledocs/vidcard.xml +62 -0
  144. data/server/lib/ext/jcl-over-slf4j-1.6.6.jar +0 -0
  145. data/server/lib/ext/jul-to-slf4j-1.6.6.jar +0 -0
  146. data/server/lib/ext/log4j-1.2.16.jar +0 -0
  147. data/server/lib/ext/slf4j-api-1.6.6.jar +0 -0
  148. data/server/lib/ext/slf4j-log4j12-1.6.6.jar +0 -0
  149. data/server/lib/jetty-continuation-8.1.8.v20121106.jar +0 -0
  150. data/server/lib/jetty-deploy-8.1.8.v20121106.jar +0 -0
  151. data/server/lib/jetty-http-8.1.8.v20121106.jar +0 -0
  152. data/server/lib/jetty-io-8.1.8.v20121106.jar +0 -0
  153. data/server/lib/jetty-jmx-8.1.8.v20121106.jar +0 -0
  154. data/server/lib/jetty-security-8.1.8.v20121106.jar +0 -0
  155. data/server/lib/jetty-server-8.1.8.v20121106.jar +0 -0
  156. data/server/lib/jetty-servlet-8.1.8.v20121106.jar +0 -0
  157. data/server/lib/jetty-util-8.1.8.v20121106.jar +0 -0
  158. data/server/lib/jetty-webapp-8.1.8.v20121106.jar +0 -0
  159. data/server/lib/jetty-xml-8.1.8.v20121106.jar +0 -0
  160. data/server/lib/servlet-api-3.0.jar +0 -0
  161. data/server/resources/log4j.properties +19 -0
  162. data/server/solr/README.txt +63 -0
  163. data/server/solr/solr.xml +53 -0
  164. data/server/solr/zoo.cfg +17 -0
  165. data/server/start.jar +0 -0
  166. data/server/webapps/solr.war +0 -0
  167. data/solr/lib/solr-winds-0.1.jar +0 -0
  168. metadata +284 -0
@@ -0,0 +1,35 @@
1
+ <!--
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ <add><doc>
19
+ <field name="id">3007WFP</field>
20
+ <field name="name">Dell Widescreen UltraSharp 3007WFP</field>
21
+ <field name="manu">Dell, Inc.</field>
22
+ <!-- Join -->
23
+ <field name="manu_id_s">dell</field>
24
+ <field name="cat">electronics</field>
25
+ <field name="cat">monitor</field>
26
+ <field name="features">30" TFT active matrix LCD, 2560 x 1600, .25mm dot pitch, 700:1 contrast</field>
27
+ <field name="includes">USB cable</field>
28
+ <field name="weight">401.6</field>
29
+ <field name="price">2199</field>
30
+ <field name="popularity">6</field>
31
+ <field name="inStock">true</field>
32
+ <!-- Buffalo store -->
33
+ <field name="store">43.17614,-90.57341</field>
34
+ </doc></add>
35
+
@@ -0,0 +1,34 @@
1
+ <!--
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ <add><doc>
19
+ <field name="id">VA902B</field>
20
+ <field name="name">ViewSonic VA902B - flat panel display - TFT - 19"</field>
21
+ <field name="manu">ViewSonic Corp.</field>
22
+ <!-- Join -->
23
+ <field name="manu_id_s">viewsonic</field>
24
+ <field name="cat">electronics</field>
25
+ <field name="cat">monitor</field>
26
+ <field name="features">19" TFT active matrix LCD, 8ms response time, 1280 x 1024 native resolution</field>
27
+ <field name="weight">190.4</field>
28
+ <field name="price">279.95</field>
29
+ <field name="popularity">6</field>
30
+ <field name="inStock">true</field>
31
+ <!-- Buffalo store -->
32
+ <field name="store">45.18814,-93.88541</field>
33
+ </doc></add>
34
+
@@ -0,0 +1,43 @@
1
+ <!--
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ <add><doc>
19
+ <field name="id">0579B002</field>
20
+ <field name="name">Canon PIXMA MP500 All-In-One Photo Printer</field>
21
+ <field name="manu">Canon Inc.</field>
22
+ <!-- Join -->
23
+ <field name="manu_id_s">canon</field>
24
+ <field name="cat">electronics</field>
25
+ <field name="cat">multifunction printer</field>
26
+ <field name="cat">printer</field>
27
+ <field name="cat">scanner</field>
28
+ <field name="cat">copier</field>
29
+ <field name="features">Multifunction ink-jet color photo printer</field>
30
+ <field name="features">Flatbed scanner, optical scan resolution of 1,200 x 2,400 dpi</field>
31
+ <field name="features">2.5" color LCD preview screen</field>
32
+ <field name="features">Duplex Copying</field>
33
+ <field name="features">Printing speed up to 29ppm black, 19ppm color</field>
34
+ <field name="features">Hi-Speed USB</field>
35
+ <field name="features">memory card: CompactFlash, Micro Drive, SmartMedia, Memory Stick, Memory Stick Pro, SD Card, and MultiMediaCard</field>
36
+ <field name="weight">352</field>
37
+ <field name="price">179.99</field>
38
+ <field name="popularity">6</field>
39
+ <field name="inStock">true</field>
40
+ <!-- Buffalo store -->
41
+ <field name="store">45.19214,-93.89941</field>
42
+ </doc></add>
43
+
Binary file
@@ -0,0 +1,30 @@
1
+ #!/bin/sh
2
+ # Licensed to the Apache Software Foundation (ASF) under one or more
3
+ # contributor license agreements. See the NOTICE file distributed with
4
+ # this work for additional information regarding copyright ownership.
5
+ # The ASF licenses this file to You under the Apache License, Version 2.0
6
+ # (the "License"); you may not use this file except in compliance with
7
+ # the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ FILES=$*
18
+ URL=http://localhost:8983/solr/update
19
+
20
+ for f in $FILES; do
21
+ echo Posting file $f to $URL
22
+ curl $URL --data-binary @$f -H 'Content-type:application/xml'
23
+ echo
24
+ done
25
+
26
+ #send the commit command to make sure all the changes are flushed and visible
27
+ #curl $URL --data-binary '<commit softCommit=true/>' -H 'Content-type:application/xml'
28
+
29
+ curl "$URL?softCommit=true"
30
+ echo
@@ -0,0 +1,38 @@
1
+ <!--
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ <add><doc>
19
+ <field name="id">9885A004</field>
20
+ <field name="name">Canon PowerShot SD500</field>
21
+ <field name="manu">Canon Inc.</field>
22
+ <!-- Join -->
23
+ <field name="manu_id_s">canon</field>
24
+ <field name="cat">electronics</field>
25
+ <field name="cat">camera</field>
26
+ <field name="features">3x zoop, 7.1 megapixel Digital ELPH</field>
27
+ <field name="features">movie clips up to 640x480 @30 fps</field>
28
+ <field name="features">2.0" TFT LCD, 118,000 pixels</field>
29
+ <field name="features">built in flash, red-eye reduction</field>
30
+ <field name="includes">32MB SD card, USB cable, AV cable, battery</field>
31
+ <field name="weight">6.4</field>
32
+ <field name="price">329.95</field>
33
+ <field name="popularity">7</field>
34
+ <field name="inStock">true</field>
35
+ <field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
36
+ <!-- Buffalo store -->
37
+ <field name="store">45.19614,-93.90341</field>
38
+ </doc></add>
@@ -0,0 +1,38 @@
1
+ <!--
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ <add>
19
+ <doc>
20
+ <field name="id">SOLR1000</field>
21
+ <field name="name">Solr, the Enterprise Search Server</field>
22
+ <field name="manu">Apache Software Foundation</field>
23
+ <field name="cat">software</field>
24
+ <field name="cat">search</field>
25
+ <field name="features">Advanced Full-Text Search Capabilities using Lucene</field>
26
+ <field name="features">Optimized for High Volume Web Traffic</field>
27
+ <field name="features">Standards Based Open Interfaces - XML and HTTP</field>
28
+ <field name="features">Comprehensive HTML Administration Interfaces</field>
29
+ <field name="features">Scalability - Efficient Replication to other Solr Search Servers</field>
30
+ <field name="features">Flexible and Adaptable with XML configuration and Schema</field>
31
+ <field name="features">Good unicode support: h&#xE9;llo (hello with an accent over the e)</field>
32
+ <field name="price">0</field>
33
+ <field name="popularity">10</field>
34
+ <field name="inStock">true</field>
35
+ <field name="incubationdate_dt">2006-01-17T00:00:00.000Z</field>
36
+ </doc>
37
+ </add>
38
+
@@ -0,0 +1,93 @@
1
+ #!/bin/sh
2
+ # Licensed to the Apache Software Foundation (ASF) under one or more
3
+ # contributor license agreements. See the NOTICE file distributed with
4
+ # this work for additional information regarding copyright ownership.
5
+ # The ASF licenses this file to You under the Apache License, Version 2.0
6
+ # (the "License"); you may not use this file except in compliance with
7
+ # the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ #Test script to tell if the server is accepting UTF-8
18
+ #The python writer currently escapes non-ascii chars, so it's good for testing
19
+
20
+ URL=http://localhost:8983/solr
21
+
22
+ if [ ! -z $1 ]; then
23
+ URL=$1
24
+ fi
25
+
26
+ curl "$URL/select?q=hello&params=explicit&wt=python" 2> /dev/null | grep 'hello' > /dev/null 2>&1
27
+ if [ $? = 0 ]; then
28
+ echo "Solr server is up."
29
+ else
30
+ echo "ERROR: Could not curl to Solr - is curl installed? Is Solr not running?"
31
+ exit 1
32
+ fi
33
+
34
+ curl "$URL/select?q=h%C3%A9llo&echoParams=explicit&wt=python" 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
35
+ if [ $? = 0 ]; then
36
+ echo "HTTP GET is accepting UTF-8"
37
+ else
38
+ echo "ERROR: HTTP GET is not accepting UTF-8"
39
+ fi
40
+
41
+ curl $URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
42
+ if [ $? = 0 ]; then
43
+ echo "HTTP POST is accepting UTF-8"
44
+ else
45
+ echo "ERROR: HTTP POST is not accepting UTF-8"
46
+ fi
47
+
48
+ curl $URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
49
+ if [ $? = 0 ]; then
50
+ echo "HTTP POST defaults to UTF-8"
51
+ else
52
+ echo "HTTP POST does not default to UTF-8"
53
+ fi
54
+
55
+
56
+ #A unicode character outside of the BMP (a circle with an x inside)
57
+ CHAR="𐌈"
58
+ CODEPOINT='0x10308'
59
+ #URL encoded UTF8 of the codepoint
60
+ URL_UTF8='%F0%90%8C%88'
61
+ #expected return of the python writer (currently uses UTF-16 surrogates)
62
+ EXPECTED='\\ud800\\udf08'
63
+
64
+ curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=python" 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
65
+ if [ $? = 0 ]; then
66
+ echo "HTTP GET is accepting UTF-8 beyond the basic multilingual plane"
67
+ else
68
+ echo "ERROR: HTTP GET is not accepting UTF-8 beyond the basic multilingual plane"
69
+ fi
70
+
71
+ curl $URL/select --data-binary "q=$URL_UTF8&echoParams=explicit&wt=python" -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
72
+ if [ $? = 0 ]; then
73
+ echo "HTTP POST is accepting UTF-8 beyond the basic multilingual plane"
74
+ else
75
+ echo "ERROR: HTTP POST is not accepting UTF-8 beyond the basic multilingual plane"
76
+ fi
77
+
78
+ curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=python" --data-binary '' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
79
+ if [ $? = 0 ]; then
80
+ echo "HTTP POST + URL params is accepting UTF-8 beyond the basic multilingual plane"
81
+ else
82
+ echo "ERROR: HTTP POST + URL params is not accepting UTF-8 beyond the basic multilingual plane"
83
+ fi
84
+
85
+ #curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=json" 2> /dev/null | od -tx1 -w1000 | sed 's/ //g' | grep 'f4808198' > /dev/null 2>&1
86
+ curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=json" 2> /dev/null | grep "$CHAR" > /dev/null 2>&1
87
+ if [ $? = 0 ]; then
88
+ echo "Response correctly returns UTF-8 beyond the basic multilingual plane"
89
+ else
90
+ echo "ERROR: Response can't return UTF-8 beyond the basic multilingual plane"
91
+ fi
92
+
93
+
@@ -0,0 +1,42 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one or more
4
+ contributor license agreements. See the NOTICE file distributed with
5
+ this work for additional information regarding copyright ownership.
6
+ The ASF licenses this file to You under the Apache License, Version 2.0
7
+ (the "License"); you may not use this file except in compliance with
8
+ the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ -->
18
+
19
+ <!--
20
+ After posting this to SOLR with post.sh, searching for "êâîôû" from
21
+ the solr/admin/ search page must return this document.
22
+ -->
23
+
24
+ <add>
25
+ <doc>
26
+ <field name="id">UTF8TEST</field>
27
+ <field name="name">Test with some UTF-8 encoded characters</field>
28
+ <field name="manu">Apache Software Foundation</field>
29
+ <field name="cat">software</field>
30
+ <field name="cat">search</field>
31
+ <field name="features">No accents here</field>
32
+ <field name="features">This is an e acute: é</field>
33
+ <field name="features">eaiou with circumflexes: êâîôû</field>
34
+ <field name="features">eaiou with umlauts: ëäïöü</field>
35
+ <field name="features">tag with escaped chars: &lt;nicetag/&gt;</field>
36
+ <field name="features">escaped ampersand: Bonnie &amp; Clyde</field>
37
+ <field name="features">Outside the BMP:𐌈 codepoint=10308, a circle with an x inside. UTF8=f0908c88 UTF16=d800 df08</field>
38
+ <field name="price">0</field>
39
+ <field name="inStock">true</field>
40
+ </doc>
41
+ </add>
42
+
@@ -0,0 +1,62 @@
1
+ <!--
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ <add>
19
+ <doc>
20
+ <field name="id">EN7800GTX/2DHTV/256M</field>
21
+ <field name="name">ASUS Extreme N7800GTX/2DHTV (256 MB)</field>
22
+ <!-- Denormalized -->
23
+ <field name="manu">ASUS Computer Inc.</field>
24
+ <!-- Join -->
25
+ <field name="manu_id_s">asus</field>
26
+ <field name="cat">electronics</field>
27
+ <field name="cat">graphics card</field>
28
+ <field name="features">NVIDIA GeForce 7800 GTX GPU/VPU clocked at 486MHz</field>
29
+ <field name="features">256MB GDDR3 Memory clocked at 1.35GHz</field>
30
+ <field name="features">PCI Express x16</field>
31
+ <field name="features">Dual DVI connectors, HDTV out, video input</field>
32
+ <field name="features">OpenGL 2.0, DirectX 9.0</field>
33
+ <field name="weight">16</field>
34
+ <field name="price">479.95</field>
35
+ <field name="popularity">7</field>
36
+ <field name="store">40.7143,-74.006</field>
37
+ <field name="inStock">false</field>
38
+ <field name="manufacturedate_dt">2006-02-13T15:26:37Z/DAY</field>
39
+ </doc>
40
+ <!-- yes, you can add more than one document at a time -->
41
+ <doc>
42
+ <field name="id">100-435805</field>
43
+ <field name="name">ATI Radeon X1900 XTX 512 MB PCIE Video Card</field>
44
+ <field name="manu">ATI Technologies</field>
45
+ <!-- Join -->
46
+ <field name="manu_id_s">ati</field>
47
+ <field name="cat">electronics</field>
48
+ <field name="cat">graphics card</field>
49
+ <field name="features">ATI RADEON X1900 GPU/VPU clocked at 650MHz</field>
50
+ <field name="features">512MB GDDR3 SDRAM clocked at 1.55GHz</field>
51
+ <field name="features">PCI Express x16</field>
52
+ <field name="features">dual DVI, HDTV, svideo, composite out</field>
53
+ <field name="features">OpenGL 2.0, DirectX 9.0</field>
54
+ <field name="weight">48</field>
55
+ <field name="price">649.99</field>
56
+ <field name="popularity">7</field>
57
+ <field name="inStock">false</field>
58
+ <field name="manufacturedate_dt">2006-02-13T15:26:37Z/DAY</field>
59
+ <!-- NYC store -->
60
+ <field name="store">40.7143,-74.006</field>
61
+ </doc>
62
+ </add>
Binary file
Binary file