View | Details | Raw Unified | Return to bug 17851
Collapse All | Expand All

(-)a/Makefile.PL (+37 lines)
Lines 228-233 Directory for Zebra's data files. Link Here
228
228
229
Directory for Zebra's UNIX-domain sockets.
229
Directory for Zebra's UNIX-domain sockets.
230
230
231
=item ELASTICSEARCH_SERVERS
232
233
Server:port of the Elasticsearch server to use, as a comma separated list:
234
eg. 192.168.0.100:9200, localhost:9200
235
236
=item ELASTICSEARCH_INDEX
237
238
Unique index in Elasticsearch, for this Koha-instance
239
eg. koha-mykoha  or just  koha
240
231
=item MISC_DIR
241
=item MISC_DIR
232
242
233
Directory for for miscellaenous scripts, among other
243
Directory for for miscellaenous scripts, among other
Lines 488-493 my %config_defaults = ( Link Here
488
  'MEMCACHED_SERVERS' => '127.0.0.1:11211',
498
  'MEMCACHED_SERVERS' => '127.0.0.1:11211',
489
  'MEMCACHED_NAMESPACE' => 'KOHA',
499
  'MEMCACHED_NAMESPACE' => 'KOHA',
490
  'TEMPLATE_CACHE_DIR' => '/tmp/koha',
500
  'TEMPLATE_CACHE_DIR' => '/tmp/koha',
501
  'USE_ELASTICSEARCH'     => 'no',
502
  'ELASTICSEARCH_SERVERS' => 'localhost:9200',
503
  'ELASTICSEARCH_INDEX'  => 'koha',
491
  'FONT_DIR'          => '/usr/share/fonts/truetype/ttf-dejavu'
504
  'FONT_DIR'          => '/usr/share/fonts/truetype/ttf-dejavu'
492
);
505
);
493
506
Lines 518-523 my %valid_config_values = ( Link Here
518
  'ZEBRA_TOKENIZER' => { chr => 1, icu => 1 },
531
  'ZEBRA_TOKENIZER' => { chr => 1, icu => 1 },
519
  'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
532
  'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
520
  'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
533
  'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
534
  'USE_ELASTICSEARCH'  => { 'yes' => 1, 'no' => 1 },
521
);
535
);
522
536
523
# get settings from command-line
537
# get settings from command-line
Lines 1199-1204 Memcached namespace?); Link Here
1199
      $config{'MEMCACHED_NAMESPACE'} = _get_value('MEMCACHED_NAMESPACE', $msg, $defaults->{'MEMCACHED_NAMESPACE'}, $valid_values, $install_log_values);
1213
      $config{'MEMCACHED_NAMESPACE'} = _get_value('MEMCACHED_NAMESPACE', $msg, $defaults->{'MEMCACHED_NAMESPACE'}, $valid_values, $install_log_values);
1200
  }
1214
  }
1201
1215
1216
1217
  $msg = q(
1218
Use Elasticsearch to serve search results?
1219
You will need a Elasticsearch server running.);
1220
  $msg .= _add_valid_values_disp('USE_ELASTICSEARCH', $valid_values);
1221
  $config{'USE_ELASTICSEARCH'} = _get_value('USE_ELASTICSEARCH', $msg, $defaults->{'USE_ELASTICSEARCH'}, $valid_values, $install_log_values);
1222
  if ($config{'USE_ELASTICSEARCH'} eq 'yes'){
1223
      $msg = q(
1224
Define the ELASTICSEARCH_SERVERS with a comma-separated list. Eg
1225
localhost:9200, 192.168.0.100:9200
1226
);
1227
      $msg = q(
1228
Elasticsearch server addresses?);
1229
      $config{'ELASTICSEARCH_SERVERS'} = _get_value('ELASTICSEARCH_SERVERS', $msg, $defaults->{'ELASTICSEARCH_SERVERS'}, $valid_values, $install_log_values);
1230
1231
      $msg = q(
1232
What index name to use for this Koha-instance? It must be unique for each Koha
1233
sharing the same Elasticsearch-cluster
1234
1235
Elasticsearch index?);
1236
      $config{'ELASTICSEARCH_INDEX'} = _get_value('ELASTICSEARCH_INDEX', $msg, $defaults->{'ELASTICSEARCH_INDEX'}, $valid_values, $install_log_values);
1237
  }
1238
1202
  $msg = q(
1239
  $msg = q(
1203
Template cache directory?);
1240
Template cache directory?);
1204
  $config{'TEMPLATE_CACHE_DIR'} = _get_value('TEMPLATE_CACHE_DIR', $msg, $defaults->{'TEMPLATE_CACHE_DIR'}, $valid_values, $install_log_values);
1241
  $config{'TEMPLATE_CACHE_DIR'} = _get_value('TEMPLATE_CACHE_DIR', $msg, $defaults->{'TEMPLATE_CACHE_DIR'}, $valid_values, $install_log_values);
(-)a/debian/templates/koha-conf-site.xml.in (-2 / +2 lines)
Lines 347-354 __END_SRU_PUBLICSERVER__ Link Here
347
347
348
 <!-- Elasticsearch Configuration -->
348
 <!-- Elasticsearch Configuration -->
349
 <elasticsearch>
349
 <elasticsearch>
350
     <server>localhost:9200</server>
350
     <server>localhost:9200</server> <!-- may be repeated to include all servers on your cluster -->
351
     <index_name>koha___KOHASITE__</index_name>
351
     <index_name>koha___KOHASITE__</index_name> <!-- should be unique amongst all the indices on your cluster. _biblios and _authorities will be appended. -->
352
 </elasticsearch>
352
 </elasticsearch>
353
 <!-- Uncomment the following line if you want to override the Elasticsearch default index settings -->
353
 <!-- Uncomment the following line if you want to override the Elasticsearch default index settings -->
354
 <!-- <elasticsearch_index_config>__KOHA_CONF_DIR__/searchengine/elasticsearch/index_config.yaml</elasticsearch_index_config> -->
354
 <!-- <elasticsearch_index_config>__KOHA_CONF_DIR__/searchengine/elasticsearch/index_config.yaml</elasticsearch_index_config> -->
(-)a/etc/koha-conf.xml (-2 / +2 lines)
Lines 163-170 __PAZPAR2_TOGGLE_XML_POST__ Link Here
163
163
164
 <!-- Elasticsearch Configuration -->
164
 <!-- Elasticsearch Configuration -->
165
 <elasticsearch>
165
 <elasticsearch>
166
     <server>localhost:9200</server>
166
     <server>__ELASTICSEARCH_SERVERS__</server>
167
     <index_name>koha___DB_NAME__</index_name>
167
     <index_name>__ELASTICSEARCH_INDEX_____DB_NAME__</index_name>
168
168
169
     <!-- See https://metacpan.org/pod/Search::Elasticsearch#cxn_pool -->
169
     <!-- See https://metacpan.org/pod/Search::Elasticsearch#cxn_pool -->
170
     <cxn_pool>Static</cxn_pool>
170
     <cxn_pool>Static</cxn_pool>
(-)a/rewrite-config.PL (-1 / +3 lines)
Lines 150-155 $prefix = $ENV{'INSTALL_BASE'} || "/usr"; Link Here
150
  "__USE_MEMCACHED__" => 'yes',
150
  "__USE_MEMCACHED__" => 'yes',
151
  "__MEMCACHED_SERVERS__" => "",
151
  "__MEMCACHED_SERVERS__" => "",
152
  "__MEMCACHED_NAMESPACE__" => "",
152
  "__MEMCACHED_NAMESPACE__" => "",
153
  "__USE_ELASTICSEARCH__" => 'no',
154
  "__ELASTICSEARCH_SERVERS__" => "localhost:9200",
155
  "__ELASTICSEARCH_INDEX__" => "koha",
153
  "__FONT_DIR__" => "/usr/share/fonts/truetype/ttf-dejavu",
156
  "__FONT_DIR__" => "/usr/share/fonts/truetype/ttf-dejavu",
154
  "__TEMPLATE_CACHE_DIR__" => "/tmp/koha"
157
  "__TEMPLATE_CACHE_DIR__" => "/tmp/koha"
155
);
158
);
156
- 

Return to bug 17851