smartmachine 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.rdoc +0 -0
  3. data/README.rdoc +87 -0
  4. data/bin/buildpacker +8 -0
  5. data/bin/prereceiver +8 -0
  6. data/bin/smartmachine +81 -0
  7. data/bin/smartrunner +28 -0
  8. data/lib/smart_machine.rb +24 -0
  9. data/lib/smart_machine/apps.rb +14 -0
  10. data/lib/smart_machine/apps/app.rb +182 -0
  11. data/lib/smart_machine/apps/rails.rb +250 -0
  12. data/lib/smart_machine/base.rb +11 -0
  13. data/lib/smart_machine/boot.rb +31 -0
  14. data/lib/smart_machine/buildpacker.rb +106 -0
  15. data/lib/smart_machine/credentials.rb +126 -0
  16. data/lib/smart_machine/docker.rb +144 -0
  17. data/lib/smart_machine/engine.rb +82 -0
  18. data/lib/smart_machine/engine/Dockerfile +27 -0
  19. data/lib/smart_machine/engine/buildpacks/rails/Dockerfile +21 -0
  20. data/lib/smart_machine/gem_version.rb +17 -0
  21. data/lib/smart_machine/grids.rb +15 -0
  22. data/lib/smart_machine/grids/elasticsearch.rb +97 -0
  23. data/lib/smart_machine/grids/elasticsearch/.keep +0 -0
  24. data/lib/smart_machine/grids/minio.rb +77 -0
  25. data/lib/smart_machine/grids/minio/.keep +0 -0
  26. data/lib/smart_machine/grids/mysql.rb +66 -0
  27. data/lib/smart_machine/grids/mysql/docker-entrypoint-initdb.d/.keep +0 -0
  28. data/lib/smart_machine/grids/nginx.rb +137 -0
  29. data/lib/smart_machine/grids/nginx/.keep +0 -0
  30. data/lib/smart_machine/grids/prereceiver.rb +170 -0
  31. data/lib/smart_machine/grids/prereceiver/Dockerfile +20 -0
  32. data/lib/smart_machine/grids/prereceiver/fcgiwrap/APKBUILD +49 -0
  33. data/lib/smart_machine/grids/prereceiver/fcgiwrap/fcgiwrap.confd +6 -0
  34. data/lib/smart_machine/grids/prereceiver/fcgiwrap/fcgiwrap.initd +43 -0
  35. data/lib/smart_machine/grids/prereceiver/fcgiwrap/fcgiwrap.pre-install +7 -0
  36. data/lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/APKINDEX.tar.gz +0 -0
  37. data/lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-1.1.1-r4.apk +0 -0
  38. data/lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-doc-1.1.1-r4.apk +0 -0
  39. data/lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-openrc-1.1.1-r4.apk +0 -0
  40. data/lib/smart_machine/grids/redis.rb +58 -0
  41. data/lib/smart_machine/grids/redis/.keep +0 -0
  42. data/lib/smart_machine/grids/solr.rb +99 -0
  43. data/lib/smart_machine/grids/solr/config/.keep +0 -0
  44. data/lib/smart_machine/grids/solr/config/README.txt +77 -0
  45. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/contractions_ca.txt +8 -0
  46. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/contractions_fr.txt +15 -0
  47. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/contractions_ga.txt +5 -0
  48. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/contractions_it.txt +23 -0
  49. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/hyphenations_ga.txt +5 -0
  50. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stemdict_nl.txt +6 -0
  51. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stoptags_ja.txt +420 -0
  52. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ar.txt +125 -0
  53. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_bg.txt +193 -0
  54. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ca.txt +220 -0
  55. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_cz.txt +172 -0
  56. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_da.txt +110 -0
  57. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_de.txt +294 -0
  58. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_el.txt +78 -0
  59. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_en.txt +54 -0
  60. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_es.txt +356 -0
  61. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_eu.txt +99 -0
  62. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_fa.txt +313 -0
  63. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_fi.txt +97 -0
  64. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_fr.txt +186 -0
  65. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ga.txt +110 -0
  66. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_gl.txt +161 -0
  67. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_hi.txt +235 -0
  68. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_hu.txt +211 -0
  69. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_hy.txt +46 -0
  70. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_id.txt +359 -0
  71. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_it.txt +303 -0
  72. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ja.txt +127 -0
  73. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_lv.txt +172 -0
  74. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_nl.txt +119 -0
  75. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_no.txt +194 -0
  76. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_pt.txt +253 -0
  77. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ro.txt +233 -0
  78. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ru.txt +243 -0
  79. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_sv.txt +133 -0
  80. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_th.txt +119 -0
  81. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_tr.txt +212 -0
  82. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/userdict_ja.txt +29 -0
  83. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/managed-schema +1007 -0
  84. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/params.json +20 -0
  85. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/protwords.txt +21 -0
  86. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/solrconfig.xml +1355 -0
  87. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/stopwords.txt +14 -0
  88. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/synonyms.txt +29 -0
  89. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/_rest_managed.json +1 -0
  90. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/_schema_analysis_stopwords_english.json +38 -0
  91. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/_schema_analysis_synonyms_english.json +11 -0
  92. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/clustering/carrot2/README.txt +11 -0
  93. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/clustering/carrot2/kmeans-attributes.xml +19 -0
  94. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/clustering/carrot2/lingo-attributes.xml +24 -0
  95. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/clustering/carrot2/stc-attributes.xml +19 -0
  96. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/currency.xml +67 -0
  97. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/elevate.xml +42 -0
  98. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/contractions_ca.txt +8 -0
  99. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/contractions_fr.txt +15 -0
  100. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/contractions_ga.txt +5 -0
  101. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/contractions_it.txt +23 -0
  102. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/hyphenations_ga.txt +5 -0
  103. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stemdict_nl.txt +6 -0
  104. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stoptags_ja.txt +420 -0
  105. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ar.txt +125 -0
  106. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_bg.txt +193 -0
  107. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ca.txt +220 -0
  108. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ckb.txt +136 -0
  109. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_cz.txt +172 -0
  110. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_da.txt +110 -0
  111. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_de.txt +294 -0
  112. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_el.txt +78 -0
  113. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_en.txt +54 -0
  114. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_es.txt +356 -0
  115. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_eu.txt +99 -0
  116. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_fa.txt +313 -0
  117. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_fi.txt +97 -0
  118. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_fr.txt +186 -0
  119. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ga.txt +110 -0
  120. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_gl.txt +161 -0
  121. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_hi.txt +235 -0
  122. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_hu.txt +211 -0
  123. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_hy.txt +46 -0
  124. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_id.txt +359 -0
  125. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_it.txt +303 -0
  126. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ja.txt +127 -0
  127. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_lv.txt +172 -0
  128. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_nl.txt +119 -0
  129. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_no.txt +194 -0
  130. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_pt.txt +253 -0
  131. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ro.txt +233 -0
  132. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ru.txt +243 -0
  133. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_sv.txt +133 -0
  134. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_th.txt +119 -0
  135. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_tr.txt +212 -0
  136. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/userdict_ja.txt +29 -0
  137. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/managed-schema +1187 -0
  138. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/mapping-FoldToASCII.txt +3813 -0
  139. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/mapping-ISOLatin1Accent.txt +246 -0
  140. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/params.json +11 -0
  141. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/protwords.txt +21 -0
  142. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/solrconfig.xml +1616 -0
  143. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/spellings.txt +2 -0
  144. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/stopwords.txt +14 -0
  145. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/synonyms.txt +29 -0
  146. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js +53 -0
  147. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/README.txt +101 -0
  148. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/VM_global_library.vm +186 -0
  149. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/browse.vm +33 -0
  150. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/cluster.vm +19 -0
  151. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/cluster_results.vm +31 -0
  152. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/debug.vm +28 -0
  153. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/did_you_mean.vm +11 -0
  154. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/error.vm +11 -0
  155. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facet_fields.vm +24 -0
  156. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facet_pivot.vm +12 -0
  157. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facet_queries.vm +12 -0
  158. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facet_ranges.vm +23 -0
  159. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facets.vm +10 -0
  160. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/footer.vm +43 -0
  161. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/head.vm +37 -0
  162. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/header.vm +7 -0
  163. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/hit.vm +25 -0
  164. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/hit_grouped.vm +43 -0
  165. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/hit_plain.vm +25 -0
  166. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/join_doc.vm +20 -0
  167. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.css +48 -0
  168. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.js +763 -0
  169. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/layout.vm +24 -0
  170. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/main.css +231 -0
  171. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/mime_type_lists.vm +68 -0
  172. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/pagination_bottom.vm +22 -0
  173. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/pagination_top.vm +29 -0
  174. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/product_doc.vm +32 -0
  175. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/query.vm +42 -0
  176. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/query_form.vm +64 -0
  177. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/query_group.vm +43 -0
  178. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/query_spatial.vm +75 -0
  179. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/results_list.vm +22 -0
  180. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/richtext_doc.vm +153 -0
  181. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/suggest.vm +8 -0
  182. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/tabs.vm +50 -0
  183. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/example.xsl +132 -0
  184. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/example_atom.xsl +67 -0
  185. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/example_rss.xsl +66 -0
  186. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/luke.xsl +337 -0
  187. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/updateXml.xsl +70 -0
  188. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/_rest_managed.json +1 -0
  189. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/admin-extra.html +31 -0
  190. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/currency.xml +67 -0
  191. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/elevate.xml +36 -0
  192. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/lang/stopwords_en.txt +54 -0
  193. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/mapping-ISOLatin1Accent.txt +246 -0
  194. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/protwords.txt +21 -0
  195. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/schema.xml +278 -0
  196. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/scripts.conf +24 -0
  197. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/solrconfig.xml +632 -0
  198. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/spellings.txt +2 -0
  199. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/synonyms.txt +29 -0
  200. data/lib/smart_machine/grids/solr/config/lib/.keep +0 -0
  201. data/lib/smart_machine/grids/solr/config/solr.xml +53 -0
  202. data/lib/smart_machine/grids/solr/config/zoo.cfg +31 -0
  203. data/lib/smart_machine/grids/solr/docker-entrypoint-initdb.d/.keep +0 -0
  204. data/lib/smart_machine/grids/solr/sunspot/conf/schema.xml +278 -0
  205. data/lib/smart_machine/grids/solr/sunspot/conf/solrconfig.xml +632 -0
  206. data/lib/smart_machine/logger.rb +35 -0
  207. data/lib/smart_machine/machine.rb +192 -0
  208. data/lib/smart_machine/ssh.rb +43 -0
  209. data/lib/smart_machine/sync.rb +108 -0
  210. data/lib/smart_machine/templates/dotsmartmachine/apps/containers/.keep +0 -0
  211. data/lib/smart_machine/templates/dotsmartmachine/apps/repositories/.keep +0 -0
  212. data/lib/smart_machine/templates/dotsmartmachine/config/environment.rb +18 -0
  213. data/lib/smart_machine/templates/dotsmartmachine/config/users.yml +4 -0
  214. data/lib/smart_machine/templates/dotsmartmachine/grids/elasticsearch/data/.keep +0 -0
  215. data/lib/smart_machine/templates/dotsmartmachine/grids/elasticsearch/logs/.keep +0 -0
  216. data/lib/smart_machine/templates/dotsmartmachine/grids/minio/data/.keep +0 -0
  217. data/lib/smart_machine/templates/dotsmartmachine/grids/mysql/data/.keep +0 -0
  218. data/lib/smart_machine/templates/dotsmartmachine/grids/nginx/certificates/.keep +0 -0
  219. data/lib/smart_machine/templates/dotsmartmachine/grids/nginx/fastcgi.conf +11 -0
  220. data/lib/smart_machine/templates/dotsmartmachine/grids/nginx/htpasswd/.keep +0 -0
  221. data/lib/smart_machine/templates/dotsmartmachine/grids/nginx/nginx.tmpl +373 -0
  222. data/lib/smart_machine/templates/dotsmartmachine/grids/prereceiver/pre-receive +17 -0
  223. data/lib/smart_machine/templates/dotsmartmachine/grids/redis/data/.keep +0 -0
  224. data/lib/smart_machine/templates/dotsmartmachine/grids/solr/solr/.keep +0 -0
  225. data/lib/smart_machine/templates/dotsmartmachine/tmp/.keep +0 -0
  226. data/lib/smart_machine/user.rb +38 -0
  227. data/lib/smart_machine/version.rb +10 -0
  228. metadata +297 -12
  229. data/README.md +0 -9
@@ -0,0 +1,21 @@
1
+ # The ASF licenses this file to You under the Apache License, Version 2.0
2
+ # (the "License"); you may not use this file except in compliance with
3
+ # the License. You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ #-----------------------------------------------------------------------
14
+ # Use a protected word file to protect against the stemmer reducing two
15
+ # unrelated words to the same base word.
16
+
17
+ # Some non-words that normally won't be encountered,
18
+ # just to test that they won't be stemmed.
19
+ dontstems
20
+ zwhacky
21
+
@@ -0,0 +1,278 @@
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
+ This is the Solr schema file. This file should be named "schema.xml" and
20
+ should be in the conf directory under the solr home
21
+ (i.e. ./solr/conf/schema.xml by default)
22
+ or located where the classloader for the Solr webapp can find it.
23
+
24
+ This example schema is the recommended starting point for users.
25
+ It should be kept correct and concise, usable out-of-the-box.
26
+
27
+ For more information, on how to customize this file, please see
28
+ http://wiki.apache.org/solr/SchemaXml
29
+
30
+ PERFORMANCE NOTE: this schema includes many optional features and should not
31
+ be used for benchmarking. To improve performance one could
32
+ - set stored="false" for all fields possible (esp large fields) when you
33
+ only need to search on the field but don't need to return the original
34
+ value.
35
+ - set indexed="false" if you don't need to search on the field, but only
36
+ return the field as a result of searching on other indexed fields.
37
+ - remove all unneeded copyField statements
38
+ - for best index size and searching performance, set "index" to false
39
+ for all general text fields, use copyField to copy them to the
40
+ catchall "text" field, and use that for searching.
41
+ - For maximum indexing performance, use the StreamingUpdateSolrServer
42
+ java client.
43
+ - Remember to run the JVM in server mode, and use a higher logging level
44
+ that avoids logging every request
45
+ -->
46
+ <schema name="sunspot" version="1.0">
47
+ <types>
48
+ <!-- field type definitions. The "name" attribute is
49
+ just a label to be used by field definitions. The "class"
50
+ attribute and any other attributes determine the real
51
+ behavior of the fieldType.
52
+ Class names starting with "solr" refer to java classes in the
53
+ org.apache.solr.analysis package.
54
+ -->
55
+ <!-- *** This fieldType is used by Sunspot! *** -->
56
+ <fieldType name="string" class="solr.StrField" omitNorms="true"/>
57
+ <!-- *** This fieldType is used by Sunspot! *** -->
58
+ <fieldType name="tdouble" class="solr.TrieDoubleField" omitNorms="true"/>
59
+ <!-- *** This fieldType is used by Sunspot! *** -->
60
+ <fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
61
+ <!-- *** This fieldType is used by Sunspot! *** -->
62
+ <fieldType name="text" class="solr.TextField" omitNorms="false">
63
+ <analyzer>
64
+ <tokenizer class="solr.StandardTokenizerFactory"/>
65
+ <filter class="solr.StandardFilterFactory"/>
66
+ <filter class="solr.LowerCaseFilterFactory"/>
67
+ <filter class="solr.PorterStemFilterFactory"/>
68
+ </analyzer>
69
+ </fieldType>
70
+ <!-- *** This fieldType is used by Sunspot! *** -->
71
+ <fieldType name="boolean" class="solr.BoolField" omitNorms="true"/>
72
+ <!-- *** This fieldType is used by Sunspot! *** -->
73
+ <fieldType name="tint" class="solr.TrieIntField" omitNorms="true"/>
74
+ <!-- *** This fieldType is used by Sunspot! *** -->
75
+ <fieldType name="tlong" class="solr.TrieLongField" omitNorms="true"/>
76
+ <!-- *** This fieldType is used by Sunspot! *** -->
77
+ <fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true"/>
78
+ <!-- *** This fieldType is used by Sunspot! *** -->
79
+ <fieldType name="tdate" class="solr.TrieDateField"
80
+ omitNorms="true"/>
81
+
82
+ <fieldType name="daterange" class="solr.DateRangeField" omitNorms="true" />
83
+
84
+ <!-- Special field type for spell correction. Be careful about
85
+ adding filters here, as they apply *before* your values go in
86
+ the spellcheck. For example, the lowercase filter here means
87
+ all spelling suggestions will be lower case (without it,
88
+ though, you'd have duplicate suggestions for lower and proper
89
+ cased words). -->
90
+ <fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" omitNorms="true">
91
+ <analyzer>
92
+ <tokenizer class="solr.StandardTokenizerFactory"/>
93
+ <filter class="solr.StandardFilterFactory"/>
94
+ <filter class="solr.LowerCaseFilterFactory"/>
95
+ </analyzer>
96
+ </fieldType>
97
+ <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
98
+ <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
99
+ </types>
100
+ <fields>
101
+ <!-- Valid attributes for fields:
102
+ name: mandatory - the name for the field
103
+ type: mandatory - the name of a previously defined type from the
104
+ <types> section
105
+ indexed: true if this field should be indexed (searchable or sortable)
106
+ stored: true if this field should be retrievable
107
+ compressed: [false] if this field should be stored using gzip compression
108
+ (this will only apply if the field type is compressable; among
109
+ the standard field types, only TextField and StrField are)
110
+ multiValued: true if this field may contain multiple values per document
111
+ omitNorms: (expert) set to true to omit the norms associated with
112
+ this field (this disables length normalization and index-time
113
+ boosting for the field, and saves some memory). Only full-text
114
+ fields or fields that need an index-time boost need norms.
115
+ termVectors: [false] set to true to store the term vector for a
116
+ given field.
117
+ When using MoreLikeThis, fields used for similarity should be
118
+ stored for best performance.
119
+ termPositions: Store position information with the term vector.
120
+ This will increase storage costs.
121
+ termOffsets: Store offset information with the term vector. This
122
+ will increase storage costs.
123
+ default: a value that should be used if no value is specified
124
+ when adding a document.
125
+ -->
126
+ <!-- *** This field is used by Sunspot! *** -->
127
+ <field name="id" stored="true" type="string" multiValued="false" indexed="true"/>
128
+ <!-- *** This field is used by Sunspot! *** -->
129
+ <field name="type" stored="false" type="string" multiValued="true" indexed="true"/>
130
+ <!-- *** This field is used by Sunspot! *** -->
131
+ <field name="class_name" stored="false" type="string" multiValued="false" indexed="true"/>
132
+ <!-- *** This field is used by Sunspot! *** -->
133
+ <field name="text" stored="false" type="string" multiValued="true" indexed="true"/>
134
+ <!-- *** This field is used by Sunspot! *** -->
135
+ <field name="lat" stored="true" type="tdouble" multiValued="false" indexed="true"/>
136
+ <!-- *** This field is used by Sunspot! *** -->
137
+ <field name="lng" stored="true" type="tdouble" multiValued="false" indexed="true"/>
138
+ <!-- *** This dynamicField is used by Sunspot! *** -->
139
+ <dynamicField name="random_*" stored="false" type="rand" multiValued="false" indexed="true"/>
140
+ <!-- *** This dynamicField is used by Sunspot! *** -->
141
+ <dynamicField name="_local*" stored="false" type="tdouble" multiValued="false" indexed="true"/>
142
+ <!-- *** This dynamicField is used by Sunspot! *** -->
143
+ <dynamicField name="*_text" stored="false" type="text" multiValued="true" indexed="true"/>
144
+ <!-- *** This dynamicField is used by Sunspot! *** -->
145
+ <dynamicField name="*_texts" stored="true" type="text" multiValued="true" indexed="true"/>
146
+ <!-- *** This dynamicField is used by Sunspot! *** -->
147
+ <dynamicField name="*_b" stored="false" type="boolean" multiValued="false" indexed="true"/>
148
+ <!-- *** This dynamicField is used by Sunspot! *** -->
149
+ <dynamicField name="*_bm" stored="false" type="boolean" multiValued="true" indexed="true"/>
150
+ <!-- *** This dynamicField is used by Sunspot! *** -->
151
+ <dynamicField name="*_bs" stored="true" type="boolean" multiValued="false" indexed="true"/>
152
+ <!-- *** This dynamicField is used by Sunspot! *** -->
153
+ <dynamicField name="*_bms" stored="true" type="boolean" multiValued="true" indexed="true"/>
154
+ <!-- *** This dynamicField is used by Sunspot! *** -->
155
+ <dynamicField name="*_d" stored="false" type="tdate" multiValued="false" indexed="true"/>
156
+ <!-- *** This dynamicField is used by Sunspot! *** -->
157
+ <dynamicField name="*_dm" stored="false" type="tdate" multiValued="true" indexed="true"/>
158
+ <!-- *** This dynamicField is used by Sunspot! *** -->
159
+ <dynamicField name="*_ds" stored="true" type="tdate" multiValued="false" indexed="true"/>
160
+ <!-- *** This dynamicField is used by Sunspot! *** -->
161
+ <dynamicField name="*_dms" stored="true" type="tdate" multiValued="true" indexed="true"/>
162
+ <!-- *** This dynamicField is used by Sunspot! *** -->
163
+ <dynamicField name="*_e" stored="false" type="tdouble" multiValued="false" indexed="true"/>
164
+ <!-- *** This dynamicField is used by Sunspot! *** -->
165
+ <dynamicField name="*_em" stored="false" type="tdouble" multiValued="true" indexed="true"/>
166
+ <!-- *** This dynamicField is used by Sunspot! *** -->
167
+ <dynamicField name="*_es" stored="true" type="tdouble" multiValued="false" indexed="true"/>
168
+ <!-- *** This dynamicField is used by Sunspot! *** -->
169
+ <dynamicField name="*_ems" stored="true" type="tdouble" multiValued="true" indexed="true"/>
170
+ <!-- *** This dynamicField is used by Sunspot! *** -->
171
+ <dynamicField name="*_f" stored="false" type="tfloat" multiValued="false" indexed="true"/>
172
+ <!-- *** This dynamicField is used by Sunspot! *** -->
173
+ <dynamicField name="*_fm" stored="false" type="tfloat" multiValued="true" indexed="true"/>
174
+ <!-- *** This dynamicField is used by Sunspot! *** -->
175
+ <dynamicField name="*_fs" stored="true" type="tfloat" multiValued="false" indexed="true"/>
176
+ <!-- *** This dynamicField is used by Sunspot! *** -->
177
+ <dynamicField name="*_fms" stored="true" type="tfloat" multiValued="true" indexed="true"/>
178
+ <!-- *** This dynamicField is used by Sunspot! *** -->
179
+ <dynamicField name="*_i" stored="false" type="tint" multiValued="false" indexed="true"/>
180
+ <!-- *** This dynamicField is used by Sunspot! *** -->
181
+ <dynamicField name="*_im" stored="false" type="tint" multiValued="true" indexed="true"/>
182
+ <!-- *** This dynamicField is used by Sunspot! *** -->
183
+ <dynamicField name="*_is" stored="true" type="tint" multiValued="false" indexed="true"/>
184
+ <!-- *** This dynamicField is used by Sunspot! *** -->
185
+ <dynamicField name="*_ims" stored="true" type="tint" multiValued="true" indexed="true"/>
186
+ <!-- *** This dynamicField is used by Sunspot! *** -->
187
+ <dynamicField name="*_l" stored="false" type="tlong" multiValued="false" indexed="true"/>
188
+ <!-- *** This dynamicField is used by Sunspot! *** -->
189
+ <dynamicField name="*_lm" stored="false" type="tlong" multiValued="true" indexed="true"/>
190
+ <!-- *** This dynamicField is used by Sunspot! *** -->
191
+ <dynamicField name="*_ls" stored="true" type="tlong" multiValued="false" indexed="true"/>
192
+ <!-- *** This dynamicField is used by Sunspot! *** -->
193
+ <dynamicField name="*_lms" stored="true" type="tlong" multiValued="true" indexed="true"/>
194
+ <!-- *** This dynamicField is used by Sunspot! *** -->
195
+ <dynamicField name="*_s" stored="false" type="string" multiValued="false" indexed="true"/>
196
+ <!-- *** This dynamicField is used by Sunspot! *** -->
197
+ <dynamicField name="*_sm" stored="false" type="string" multiValued="true" indexed="true"/>
198
+ <!-- *** This dynamicField is used by Sunspot! *** -->
199
+ <dynamicField name="*_ss" stored="true" type="string" multiValued="false" indexed="true"/>
200
+ <!-- *** This dynamicField is used by Sunspot! *** -->
201
+ <dynamicField name="*_sms" stored="true" type="string" multiValued="true" indexed="true"/>
202
+ <!-- *** This dynamicField is used by Sunspot! *** -->
203
+ <dynamicField name="*_it" stored="false" type="tint" multiValued="false" indexed="true"/>
204
+ <!-- *** This dynamicField is used by Sunspot! *** -->
205
+ <dynamicField name="*_itm" stored="false" type="tint" multiValued="true" indexed="true"/>
206
+ <!-- *** This dynamicField is used by Sunspot! *** -->
207
+ <dynamicField name="*_its" stored="true" type="tint" multiValued="false" indexed="true"/>
208
+ <!-- *** This dynamicField is used by Sunspot! *** -->
209
+ <dynamicField name="*_itms" stored="true" type="tint" multiValued="true" indexed="true"/>
210
+ <!-- *** This dynamicField is used by Sunspot! *** -->
211
+ <dynamicField name="*_ft" stored="false" type="tfloat" multiValued="false" indexed="true"/>
212
+ <!-- *** This dynamicField is used by Sunspot! *** -->
213
+ <dynamicField name="*_ftm" stored="false" type="tfloat" multiValued="true" indexed="true"/>
214
+ <!-- *** This dynamicField is used by Sunspot! *** -->
215
+ <dynamicField name="*_fts" stored="true" type="tfloat" multiValued="false" indexed="true"/>
216
+ <!-- *** This dynamicField is used by Sunspot! *** -->
217
+ <dynamicField name="*_ftms" stored="true" type="tfloat" multiValued="true" indexed="true"/>
218
+ <!-- *** This dynamicField is used by Sunspot! *** -->
219
+ <dynamicField name="*_dt" stored="false" type="tdate" multiValued="false" indexed="true"/>
220
+ <!-- *** This dynamicField is used by Sunspot! *** -->
221
+ <dynamicField name="*_dtm" stored="false" type="tdate" multiValued="true" indexed="true"/>
222
+ <!-- *** This dynamicField is used by Sunspot! *** -->
223
+ <dynamicField name="*_dts" stored="true" type="tdate" multiValued="false" indexed="true"/>
224
+ <!-- *** This dynamicField is used by Sunspot! *** -->
225
+ <dynamicField name="*_dtms" stored="true" type="tdate" multiValued="true" indexed="true"/>
226
+ <!-- *** This dynamicField is used by Sunspot! *** -->
227
+ <dynamicField name="*_textv" stored="false" termVectors="true" type="text" multiValued="true" indexed="true"/>
228
+ <!-- *** This dynamicField is used by Sunspot! *** -->
229
+ <dynamicField name="*_textsv" stored="true" termVectors="true" type="text" multiValued="true" indexed="true"/>
230
+ <!-- *** This dynamicField is used by Sunspot! *** -->
231
+ <dynamicField name="*_et" stored="false" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
232
+ <!-- *** This dynamicField is used by Sunspot! *** -->
233
+ <dynamicField name="*_etm" stored="false" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
234
+ <!-- *** This dynamicField is used by Sunspot! *** -->
235
+ <dynamicField name="*_ets" stored="true" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
236
+ <!-- *** This dynamicField is used by Sunspot! *** -->
237
+ <dynamicField name="*_etms" stored="true" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
238
+ <!-- *** This dynamicField is used by Sunspot! *** -->
239
+ <dynamicField name="*_dr" stored="false" type="daterange" multiValued="false" indexed="true" />
240
+ <!-- *** This dynamicField is used by Sunspot! *** -->
241
+ <dynamicField name="*_drm" stored="false" type="daterange" multiValued="true" indexed="true" />
242
+ <!-- *** This dynamicField is used by Sunspot! *** -->
243
+ <dynamicField name="*_drs" stored="true" type="daterange" multiValued="false" indexed="true" />
244
+ <!-- *** This dynamicField is used by Sunspot! *** -->
245
+ <dynamicField name="*_drms" stored="true" type="daterange" multiValued="true" indexed="true" />
246
+
247
+ <!-- Type used to index the lat and lon components for the "location" FieldType -->
248
+ <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" multiValued="false"/>
249
+ <dynamicField name="*_p" type="location" indexed="true" stored="true" multiValued="false"/>
250
+
251
+ <dynamicField name="*_ll" stored="false" type="location" multiValued="false" indexed="true"/>
252
+ <dynamicField name="*_llm" stored="false" type="location" multiValued="true" indexed="true"/>
253
+ <dynamicField name="*_lls" stored="true" type="location" multiValued="false" indexed="true"/>
254
+ <dynamicField name="*_llms" stored="true" type="location" multiValued="true" indexed="true"/>
255
+ <field name="textSpell" stored="false" type="textSpell" multiValued="true" indexed="true"/>
256
+
257
+ <!-- required by Solr 5 -->
258
+ <field name="_version_" type="tlong" indexed="true" stored="true" multiValued="false" />
259
+ </fields>
260
+
261
+ <!-- Field to use to determine and enforce document uniqueness.
262
+ Unless this field is marked with required="false", it will be a required field
263
+ -->
264
+ <uniqueKey>id</uniqueKey>
265
+ <!-- field for the QueryParser to use when an explicit fieldname is absent -->
266
+ <!-- <defaultSearchField>text</defaultSearchField> -->
267
+ <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
268
+ <!-- <solrQueryParser defaultOperator="AND"/> -->
269
+ <!-- copyField commands copy one field to another at the time a document
270
+ is added to the index. It's used either to index the same field differently,
271
+ or to add multiple fields to the same field for easier/faster
272
+ searching. -->
273
+
274
+ <!-- Use copyField to copy the fields you want to run spell checking
275
+ on into one field. For example: -->
276
+ <copyField source="*_text" dest="textSpell" />
277
+ <copyField source="*_s" dest="textSpell" />
278
+ </schema>
@@ -0,0 +1,24 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ user=
17
+ solr_hostname=localhost
18
+ solr_port=8983
19
+ rsyncd_port=18983
20
+ data_dir=
21
+ webapp_name=solr
22
+ master_host=
23
+ master_data_dir=
24
+ master_status_dir=
@@ -0,0 +1,632 @@
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
+ For more details about configurations options that may appear in
21
+ this file, see http://wiki.apache.org/solr/SolrConfigXml.
22
+ -->
23
+ <config>
24
+ <!-- In all configuration below, a prefix of "solr." for class names
25
+ is an alias that causes solr to search appropriate packages,
26
+ including org.apache.solr.(search|update|request|core|analysis)
27
+
28
+ You may also specify a fully qualified Java classname if you
29
+ have your own custom plugins.
30
+ -->
31
+
32
+ <!-- Controls what version of Lucene various components of Solr
33
+ adhere to. Generally, you want to use the latest version to
34
+ get all bug fixes and improvements. It is highly recommended
35
+ that you fully re-index after changing this setting as it can
36
+ affect both how text is indexed and queried.
37
+ -->
38
+ <luceneMatchVersion>5.0.0</luceneMatchVersion>
39
+
40
+ <!-- Data Directory
41
+
42
+ Used to specify an alternate directory to hold all index data
43
+ other than the default ./data under the Solr home. If
44
+ replication is in use, this should match the replication
45
+ configuration.
46
+ -->
47
+ <dataDir>${solr.data.dir:}</dataDir>
48
+
49
+
50
+ <!-- The DirectoryFactory to use for indexes.
51
+
52
+ solr.StandardDirectoryFactory is filesystem
53
+ based and tries to pick the best implementation for the current
54
+ JVM and platform. solr.NRTCachingDirectoryFactory, the default,
55
+ wraps solr.StandardDirectoryFactory and caches small files in memory
56
+ for better NRT performance.
57
+
58
+ One can force a particular implementation via solr.MMapDirectoryFactory,
59
+ solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
60
+
61
+ solr.RAMDirectoryFactory is memory based, not
62
+ persistent, and doesn't work with replication.
63
+ -->
64
+ <directoryFactory name="DirectoryFactory"
65
+ class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
66
+ </directoryFactory>
67
+
68
+ <!-- The CodecFactory for defining the format of the inverted index.
69
+ The default implementation is SchemaCodecFactory, which is the official Lucene
70
+ index format, but hooks into the schema to provide per-field customization of
71
+ the postings lists and per-document values in the fieldType element
72
+ (postingsFormat/docValuesFormat). Note that most of the alternative implementations
73
+ are experimental, so if you choose to customize the index format, it's a good
74
+ idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
75
+ before upgrading to a newer version to avoid unnecessary reindexing.
76
+ -->
77
+ <codecFactory class="solr.SchemaCodecFactory"/>
78
+
79
+ <schemaFactory class="ClassicIndexSchemaFactory"/>
80
+
81
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82
+ Index Config - These settings control low-level behavior of indexing
83
+ Most example settings here show the default value, but are commented
84
+ out, to more easily see where customizations have been made.
85
+
86
+ Note: This replaces <indexDefaults> and <mainIndex> from older versions
87
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
88
+ <indexConfig>
89
+
90
+ <!-- LockFactory
91
+
92
+ This option specifies which Lucene LockFactory implementation
93
+ to use.
94
+
95
+ single = SingleInstanceLockFactory - suggested for a
96
+ read-only index or when there is no possibility of
97
+ another process trying to modify the index.
98
+ native = NativeFSLockFactory - uses OS native file locking.
99
+ Do not use when multiple solr webapps in the same
100
+ JVM are attempting to share a single index.
101
+ simple = SimpleFSLockFactory - uses a plain file for locking
102
+
103
+ Defaults: 'native' is default for Solr3.6 and later, otherwise
104
+ 'simple' is the default
105
+
106
+ More details on the nuances of each LockFactory...
107
+ http://wiki.apache.org/lucene-java/AvailableLockFactories
108
+ -->
109
+ <lockType>${solr.lock.type:native}</lockType>
110
+
111
+ <!-- Lucene Infostream
112
+
113
+ To aid in advanced debugging, Lucene provides an "InfoStream"
114
+ of detailed information when indexing.
115
+
116
+ Setting the value to true will instruct the underlying Lucene
117
+ IndexWriter to write its info stream to solr's log. By default,
118
+ this is enabled here, and controlled through log4j.properties.
119
+ -->
120
+ <infoStream>true</infoStream>
121
+ </indexConfig>
122
+
123
+
124
+ <!-- JMX
125
+
126
+ This example enables JMX if and only if an existing MBeanServer
127
+ is found, use this if you want to configure JMX through JVM
128
+ parameters. Remove this to disable exposing Solr configuration
129
+ and statistics to JMX.
130
+
131
+ For more details see http://wiki.apache.org/solr/SolrJmx
132
+ -->
133
+ <jmx />
134
+ <!-- If you want to connect to a particular server, specify the
135
+ agentId
136
+ -->
137
+ <!-- <jmx agentId="myAgent" /> -->
138
+ <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
139
+ <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
140
+ -->
141
+
142
+ <!-- The default high-performance update handler -->
143
+ <updateHandler class="solr.DirectUpdateHandler2">
144
+
145
+ <!-- Enables a transaction log, used for real-time get, durability, and
146
+ and solr cloud replica recovery. The log can grow as big as
147
+ uncommitted changes to the index, so use of a hard autoCommit
148
+ is recommended (see below).
149
+ "dir" - the target directory for transaction logs, defaults to the
150
+ solr data directory. -->
151
+ <updateLog>
152
+ <str name="dir">${solr.ulog.dir:}</str>
153
+ </updateLog>
154
+
155
+ <!-- AutoCommit
156
+
157
+ Perform a hard commit automatically under certain conditions.
158
+ Instead of enabling autoCommit, consider using "commitWithin"
159
+ when adding documents.
160
+
161
+ http://wiki.apache.org/solr/UpdateXmlMessages
162
+
163
+ maxDocs - Maximum number of documents to add since the last
164
+ commit before automatically triggering a new commit.
165
+
166
+ maxTime - Maximum amount of time in ms that is allowed to pass
167
+ since a document was added before automatically
168
+ triggering a new commit.
169
+ openSearcher - if false, the commit causes recent index changes
170
+ to be flushed to stable storage, but does not cause a new
171
+ searcher to be opened to make those changes visible.
172
+
173
+ If the updateLog is enabled, then it's highly recommended to
174
+ have some sort of hard autoCommit to limit the log size.
175
+ -->
176
+ <autoCommit>
177
+ <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
178
+ <openSearcher>false</openSearcher>
179
+ </autoCommit>
180
+
181
+ <!-- softAutoCommit is like autoCommit except it causes a
182
+ 'soft' commit which only ensures that changes are visible
183
+ but does not ensure that data is synced to disk. This is
184
+ faster and more near-realtime friendly than a hard commit.
185
+ -->
186
+ <autoSoftCommit>
187
+ <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
188
+ </autoSoftCommit>
189
+
190
+ </updateHandler>
191
+
192
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
193
+ Query section - these settings control query time things like caches
194
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
195
+ <query>
196
+ <!-- Max Boolean Clauses
197
+
198
+ Maximum number of clauses in each BooleanQuery, an exception
199
+ is thrown if exceeded.
200
+
201
+ ** WARNING **
202
+
203
+ This option actually modifies a global Lucene property that
204
+ will affect all SolrCores. If multiple solrconfig.xml files
205
+ disagree on this property, the value at any given moment will
206
+ be based on the last SolrCore to be initialized.
207
+
208
+ -->
209
+ <maxBooleanClauses>1024</maxBooleanClauses>
210
+
211
+
212
+ <!-- Solr Internal Query Caches
213
+
214
+ There are two implementations of cache available for Solr,
215
+ LRUCache, based on a synchronized LinkedHashMap, and
216
+ FastLRUCache, based on a ConcurrentHashMap.
217
+
218
+ FastLRUCache has faster gets and slower puts in single
219
+ threaded operation and thus is generally faster than LRUCache
220
+ when the hit ratio of the cache is high (> 75%), and may be
221
+ faster under other scenarios on multi-cpu systems.
222
+ -->
223
+
224
+ <!-- Filter Cache
225
+
226
+ Cache used by SolrIndexSearcher for filters (DocSets),
227
+ unordered sets of *all* documents that match a query. When a
228
+ new searcher is opened, its caches may be prepopulated or
229
+ "autowarmed" using data from caches in the old searcher.
230
+ autowarmCount is the number of items to prepopulate. For
231
+ LRUCache, the autowarmed items will be the most recently
232
+ accessed items.
233
+
234
+ Parameters:
235
+ class - the SolrCache implementation LRUCache or
236
+ (LRUCache or FastLRUCache)
237
+ size - the maximum number of entries in the cache
238
+ initialSize - the initial capacity (number of entries) of
239
+ the cache. (see java.util.HashMap)
240
+ autowarmCount - the number of entries to prepopulate from
241
+ and old cache.
242
+ -->
243
+ <filterCache class="solr.FastLRUCache"
244
+ size="512"
245
+ initialSize="512"
246
+ autowarmCount="0"/>
247
+
248
+ <!-- Query Result Cache
249
+
250
+ Caches results of searches - ordered lists of document ids
251
+ (DocList) based on a query, a sort, and the range of documents requested.
252
+ -->
253
+ <queryResultCache class="solr.LRUCache"
254
+ size="512"
255
+ initialSize="512"
256
+ autowarmCount="0"/>
257
+
258
+ <!-- Document Cache
259
+
260
+ Caches Lucene Document objects (the stored fields for each
261
+ document). Since Lucene internal document ids are transient,
262
+ this cache will not be autowarmed.
263
+ -->
264
+ <documentCache class="solr.LRUCache"
265
+ size="512"
266
+ initialSize="512"
267
+ autowarmCount="0"/>
268
+
269
+ <!-- custom cache currently used by block join -->
270
+ <cache name="perSegFilter"
271
+ class="solr.search.LRUCache"
272
+ size="10"
273
+ initialSize="0"
274
+ autowarmCount="10"
275
+ regenerator="solr.NoOpRegenerator" />
276
+
277
+ <!-- Lazy Field Loading
278
+
279
+ If true, stored fields that are not requested will be loaded
280
+ lazily. This can result in a significant speed improvement
281
+ if the usual case is to not load all stored fields,
282
+ especially if the skipped fields are large compressed text
283
+ fields.
284
+ -->
285
+ <enableLazyFieldLoading>true</enableLazyFieldLoading>
286
+
287
+ <!-- Result Window Size
288
+
289
+ An optimization for use with the queryResultCache. When a search
290
+ is requested, a superset of the requested number of document ids
291
+ are collected. For example, if a search for a particular query
292
+ requests matching documents 10 through 19, and queryWindowSize is 50,
293
+ then documents 0 through 49 will be collected and cached. Any further
294
+ requests in that range can be satisfied via the cache.
295
+ -->
296
+ <queryResultWindowSize>20</queryResultWindowSize>
297
+
298
+ <!-- Maximum number of documents to cache for any entry in the
299
+ queryResultCache.
300
+ -->
301
+ <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
302
+
303
+ <!-- Use Cold Searcher
304
+
305
+ If a search request comes in and there is no current
306
+ registered searcher, then immediately register the still
307
+ warming searcher and use it. If "false" then all requests
308
+ will block until the first searcher is done warming.
309
+ -->
310
+ <useColdSearcher>false</useColdSearcher>
311
+
312
+ <!-- Max Warming Searchers
313
+
314
+ Maximum number of searchers that may be warming in the
315
+ background concurrently. An error is returned if this limit
316
+ is exceeded.
317
+
318
+ Recommend values of 1-2 for read-only slaves, higher for
319
+ masters w/o cache warming.
320
+ -->
321
+ <maxWarmingSearchers>2</maxWarmingSearchers>
322
+
323
+ </query>
324
+
325
+
326
+ <!-- Request Dispatcher
327
+
328
+ This section contains instructions for how the SolrDispatchFilter
329
+ should behave when processing requests for this SolrCore.
330
+
331
+ handleSelect is a legacy option that affects the behavior of requests
332
+ such as /select?qt=XXX
333
+
334
+ handleSelect="true" will cause the SolrDispatchFilter to process
335
+ the request and dispatch the query to a handler specified by the
336
+ "qt" param, assuming "/select" isn't already registered.
337
+
338
+ handleSelect="false" will cause the SolrDispatchFilter to
339
+ ignore "/select" requests, resulting in a 404 unless a handler
340
+ is explicitly registered with the name "/select"
341
+
342
+ handleSelect="true" is not recommended for new users, but is the default
343
+ for backwards compatibility
344
+ -->
345
+ <requestDispatcher handleSelect="false" >
346
+ <!-- Request Parsing
347
+
348
+ These settings indicate how Solr Requests may be parsed, and
349
+ what restrictions may be placed on the ContentStreams from
350
+ those requests
351
+
352
+ enableRemoteStreaming - enables use of the stream.file
353
+ and stream.url parameters for specifying remote streams.
354
+
355
+ multipartUploadLimitInKB - specifies the max size (in KiB) of
356
+ Multipart File Uploads that Solr will allow in a Request.
357
+
358
+ formdataUploadLimitInKB - specifies the max size (in KiB) of
359
+ form data (application/x-www-form-urlencoded) sent via
360
+ POST. You can use POST to pass request parameters not
361
+ fitting into the URL.
362
+
363
+ addHttpRequestToContext - if set to true, it will instruct
364
+ the requestParsers to include the original HttpServletRequest
365
+ object in the context map of the SolrQueryRequest under the
366
+ key "httpRequest". It will not be used by any of the existing
367
+ Solr components, but may be useful when developing custom
368
+ plugins.
369
+
370
+ *** WARNING ***
371
+ The settings below authorize Solr to fetch remote files, You
372
+ should make sure your system has some authentication before
373
+ using enableRemoteStreaming="true"
374
+
375
+ -->
376
+ <requestParsers enableRemoteStreaming="true"
377
+ multipartUploadLimitInKB="2048000"
378
+ formdataUploadLimitInKB="2048"
379
+ addHttpRequestToContext="false"/>
380
+
381
+ <!-- HTTP Caching
382
+
383
+ Set HTTP caching related parameters (for proxy caches and clients).
384
+
385
+ The options below instruct Solr not to output any HTTP Caching
386
+ related headers
387
+ -->
388
+ <httpCaching never304="true" />
389
+
390
+ </requestDispatcher>
391
+
392
+ <!-- Request Handlers
393
+
394
+ http://wiki.apache.org/solr/SolrRequestHandler
395
+
396
+ Incoming queries will be dispatched to a specific handler by name
397
+ based on the path specified in the request.
398
+
399
+ Legacy behavior: If the request path uses "/select" but no Request
400
+ Handler has that name, and if handleSelect="true" has been specified in
401
+ the requestDispatcher, then the Request Handler is dispatched based on
402
+ the qt parameter. Handlers without a leading '/' are accessed this way
403
+ like so: http://host/app/[core/]select?qt=name If no qt is
404
+ given, then the requestHandler that declares default="true" will be
405
+ used or the one named "standard".
406
+
407
+ If a Request Handler is declared with startup="lazy", then it will
408
+ not be initialized until the first request that uses it.
409
+
410
+ -->
411
+ <!-- SearchHandler
412
+
413
+ http://wiki.apache.org/solr/SearchHandler
414
+
415
+ For processing Search Queries, the primary Request Handler
416
+ provided with Solr is "SearchHandler" It delegates to a sequent
417
+ of SearchComponents (see below) and supports distributed
418
+ queries across multiple shards
419
+ -->
420
+ <requestHandler name="/select" class="solr.SearchHandler">
421
+ <lst name="defaults">
422
+ <str name="spellcheck.dictionary">default</str>
423
+ <str name="spellcheck.extendedResults">true</str>
424
+ <str name="spellcheck.collate">true</str>
425
+ </lst>
426
+ <arr name="last-components">
427
+ <str>spellcheck</str>
428
+ </arr>
429
+ </requestHandler>
430
+
431
+ <!-- A request handler that returns indented JSON by default -->
432
+ <requestHandler name="/query" class="solr.SearchHandler">
433
+ <lst name="defaults">
434
+ <str name="echoParams">explicit</str>
435
+ <str name="wt">json</str>
436
+ <str name="indent">true</str>
437
+ <str name="df">text</str>
438
+ <str name="q.op">AND</str>
439
+ </lst>
440
+ <arr name="last-components">
441
+ <str>spellcheck</str>
442
+ </arr>
443
+ </requestHandler>
444
+
445
+ <!--
446
+ The export request handler is used to export full sorted result sets.
447
+ Do not change these defaults.
448
+ -->
449
+ <requestHandler name="/export" class="solr.SearchHandler">
450
+ <lst name="invariants">
451
+ <str name="rq">{!xport}</str>
452
+ <str name="wt">xsort</str>
453
+ <str name="distrib">false</str>
454
+ </lst>
455
+
456
+ <arr name="components">
457
+ <str>query</str>
458
+ </arr>
459
+ </requestHandler>
460
+
461
+
462
+ <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell">
463
+ <lst name="defaults">
464
+ <str name="df">text</str>
465
+ </lst>
466
+ </initParams>
467
+
468
+ <!-- Field Analysis Request Handler
469
+
470
+ RequestHandler that provides much the same functionality as
471
+ analysis.jsp. Provides the ability to specify multiple field
472
+ types and field names in the same request and outputs
473
+ index-time and query-time analysis for each of them.
474
+
475
+ Request parameters are:
476
+ analysis.fieldname - field name whose analyzers are to be used
477
+
478
+ analysis.fieldtype - field type whose analyzers are to be used
479
+ analysis.fieldvalue - text for index-time analysis
480
+ q (or analysis.q) - text for query time analysis
481
+ analysis.showmatch (true|false) - When set to true and when
482
+ query analysis is performed, the produced tokens of the
483
+ field value analysis will be marked as "matched" for every
484
+ token that is produces by the query analysis
485
+ -->
486
+ <requestHandler name="/analysis/field"
487
+ startup="lazy"
488
+ class="solr.FieldAnalysisRequestHandler" />
489
+
490
+
491
+ <!-- Document Analysis Handler
492
+
493
+ http://wiki.apache.org/solr/AnalysisRequestHandler
494
+
495
+ An analysis handler that provides a breakdown of the analysis
496
+ process of provided documents. This handler expects a (single)
497
+ content stream with the following format:
498
+
499
+ <docs>
500
+ <doc>
501
+ <field name="id">1</field>
502
+ <field name="name">The Name</field>
503
+ <field name="text">The Text Value</field>
504
+ </doc>
505
+ <doc>...</doc>
506
+ <doc>...</doc>
507
+ ...
508
+ </docs>
509
+
510
+ Note: Each document must contain a field which serves as the
511
+ unique key. This key is used in the returned response to associate
512
+ an analysis breakdown to the analyzed document.
513
+
514
+ Like the FieldAnalysisRequestHandler, this handler also supports
515
+ query analysis by sending either an "analysis.query" or "q"
516
+ request parameter that holds the query text to be analyzed. It
517
+ also supports the "analysis.showmatch" parameter which when set to
518
+ true, all field tokens that match the query tokens will be marked
519
+ as a "match".
520
+ -->
521
+ <requestHandler name="/analysis/document"
522
+ class="solr.DocumentAnalysisRequestHandler"
523
+ startup="lazy" />
524
+
525
+ <!-- Echo the request contents back to the client -->
526
+ <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
527
+ <lst name="defaults">
528
+ <str name="echoParams">explicit</str>
529
+ <str name="echoHandler">true</str>
530
+ </lst>
531
+ </requestHandler>
532
+
533
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
534
+
535
+ <str name="queryAnalyzerFieldType">textSpell</str>
536
+
537
+ <!-- Multiple "Spell Checkers" can be declared and used by this
538
+ component
539
+ -->
540
+ <lst name="spellchecker">
541
+ <str name="name">default</str>
542
+ <!-- change field to textSpell and use copyField in schema.xml
543
+ to spellcheck multiple fields -->
544
+ <str name="field">textSpell</str>
545
+ <str name="buildOnOptimize">true</str>
546
+ </lst>
547
+
548
+ <lst name="spellchecker">
549
+ <str name="name">example</str>
550
+ <str name="field">title_text</str>
551
+ <str name="buildOnOptimize">true</str>
552
+ <str name="classname">solr.DirectSolrSpellChecker</str>
553
+ <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
554
+ <str name="distanceMeasure">internal</str>
555
+ <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
556
+ <float name="accuracy">0.5</float>
557
+ <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
558
+ <int name="maxEdits">2</int>
559
+ <!-- the minimum shared prefix when enumerating terms -->
560
+ <int name="minPrefix">1</int>
561
+ <!-- maximum number of inspections per result. -->
562
+ <int name="maxInspections">5</int>
563
+ <!-- minimum length of a query term to be considered for correction -->
564
+ <int name="minQueryLength">4</int>
565
+ <!-- maximum threshold of documents a query term can appear to be considered for correction -->
566
+ <float name="maxQueryFrequency">0.01</float>
567
+ <!-- uncomment this to require suggestions to occur in 1% of the documents
568
+ <float name="thresholdTokenFrequency">.01</float>
569
+ -->
570
+ </lst>
571
+
572
+ <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
573
+ <lst name="spellchecker">
574
+ <str name="name">wordbreak</str>
575
+ <str name="classname">solr.WordBreakSolrSpellChecker</str>
576
+ <str name="field">name</str>
577
+ <str name="combineWords">true</str>
578
+ <str name="breakWords">true</str>
579
+ <int name="maxChanges">10</int>
580
+ </lst>
581
+ -->
582
+ </searchComponent>
583
+
584
+ <!-- Search Components
585
+
586
+ Search components are registered to SolrCore and used by
587
+ instances of SearchHandler (which can access them by name)
588
+
589
+ By default, the following components are available:
590
+
591
+ <searchComponent name="query" class="solr.QueryComponent" />
592
+ <searchComponent name="facet" class="solr.FacetComponent" />
593
+ <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
594
+ <searchComponent name="highlight" class="solr.HighlightComponent" />
595
+ <searchComponent name="stats" class="solr.StatsComponent" />
596
+ <searchComponent name="debug" class="solr.DebugComponent" />
597
+
598
+ -->
599
+
600
+ <!-- Terms Component
601
+
602
+ http://wiki.apache.org/solr/TermsComponent
603
+
604
+ A component to return terms and document frequency of those
605
+ terms
606
+ -->
607
+ <searchComponent name="terms" class="solr.TermsComponent"/>
608
+
609
+ <!-- A request handler for demonstrating the terms component -->
610
+ <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
611
+ <lst name="defaults">
612
+ <bool name="terms">true</bool>
613
+ <bool name="distrib">false</bool>
614
+ </lst>
615
+ <arr name="components">
616
+ <str>terms</str>
617
+ </arr>
618
+ </requestHandler>
619
+
620
+ <requestHandler class="solr.MoreLikeThisHandler" name="/mlt">
621
+ <lst name="defaults">
622
+ <str name="mlt.mintf">1</str>
623
+ <str name="mlt.mindf">2</str>
624
+ </lst>
625
+ </requestHandler>
626
+
627
+ <!-- Legacy config for the admin interface -->
628
+ <admin>
629
+ <defaultQuery>*:*</defaultQuery>
630
+ </admin>
631
+
632
+ </config>