Manybubbles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/158376

Change subject: README updates
......................................................................

README updates

Also includes instructions to expand groovy sandbox to run cirrus properly.

Change-Id: I674160b8c423baee12a1626d1ffdd372f45ab018
---
M README
A elasticsearch.yml
2 files changed, 102 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/76/158376/1

diff --git a/README b/README
index 3cfcc49..7f4fa3b 100644
--- a/README
+++ b/README
@@ -3,17 +3,15 @@
 
 Installation
 ------------
-Get Elasticsearch up and running somewhere.  1.2.1 and above are all fine with 
1.3.x required soon.
+Get Elasticsearch up and running somewhere.  1.3.2 and above are all fine.
 
-CirrusSearch makes use of the dynamic scripting feature in Elasticsearch for 
improved performance.
-With Elasticsearch 1.2.0 and higher, dynamic scripting is disabled per default 
but can and
-needs to be enabled for Cirrus.
+Optional: CirrusSearch makes use of sandboxed dynamic scripts in 
Elasticsearch.  For most
+functions the sandbox is fine but some advanced features (source regular 
expression search)
+require relaxing the sandbox some.  To do this add the contents of 
elasticsearch.yml located
+in this directory to the elasticsearch.yml that came with Elasticsearch and 
restart
+Elasticsearch.
 
-In the elasticsearch.yml config, add:
-
- script.disable_dynamic: false
-
-Then place the CirrusSearch extension in your extensions directory.
+Place the CirrusSearch extension in your extensions directory.
 Make sure you have the curl php library installed (sudo apt-get install 
php5-curl in Debian.)
 You also need to install the Elastica MediaWiki extension.
 Add this to LocalSettings.php:
@@ -238,6 +236,18 @@
 sure fire way to get it to work is also the slowest.  Add this to your 
LocalSettings.php:
  $wgRunJobsAsync = false;
 
+
+Development
+-----------
+The fastest way to get started with CirrusSearch development is to use 
MediaWiki-Vagrant.
+1.  Follow steps here: 
https://www.mediawiki.org/wiki/MediaWiki-Vagrant#Quick_start
+2.  Now execute the following:
+vagrant enable-role cirrussearch
+vagrant provision
+
+This can take some time but it produces a clean development environment in a 
virtual machine
+that has everything required to run Cirrus.
+
 Hooks
 -----
 CirrusSearch provides hooks that other extensions can make use of to extend 
the core schema and
diff --git a/elasticsearch.yml b/elasticsearch.yml
new file mode 100644
index 0000000..98bd6bc
--- /dev/null
+++ b/elasticsearch.yml
@@ -0,0 +1,83 @@
+# The default sandbox for Groovy is too restrictive for Cirrus.  This adds a
+# few more allowed invocations.
+script.groovy.sandbox.class_whitelist:
+ #Defaults
+ - java.util.Date
+ - java.util.Map
+ - java.util.List
+ - java.util.Set
+ - java.util.ArrayList
+ - java.util.Arrays
+ - java.util.HashMap
+ - java.util.HashSet
+ - java.util.UUID
+ - java.math.BigDecimal
+ - org.joda.time.DateTime
+ - org.joda.time.DateTimeZone
+ - org.elasticsearch.common.joda.time.DateTime
+ - org.elasticsearch.common.joda.time.DateTimeZone
+ # Added for Cirrus
+ - java.util.Locale
+ - org.apache.lucene.util.automaton.RegExp
+ - org.apache.lucene.util.automaton.CharacterRunAutomaton
+script.groovy.sandbox.package_whitelist:
+ # Defaults
+ - java.util
+ - java.lang
+ - org.joda.time
+ - org.elasticsearch.common.joda.time
+ # Added for Cirrus
+ - org.apache.lucene.util.automaton
+script.groovy.sandbox.receiver_whitelist:
+ # Defaults
+ - java.lang.Math
+ - java.lang.Integer
+ - "[I"
+ - "[[I"
+ - "[[[I"
+ - java.lang.Float
+ - "[F"
+ - "[[F"
+ - "[[[F"
+ - java.lang.Double
+ - "[D"
+ - "[[D"
+ - "[[[D"
+ - java.lang.Long
+ - "[J"
+ - "[[J"
+ - "[[[J"
+ - java.lang.Short
+ - "[S"
+ - "[[S"
+ - "[[[S"
+ - java.lang.Character
+ - "[C"
+ - "[[C"
+ - "[[[C"
+ - java.lang.Byte
+ - "[B"
+ - "[[B"
+ - "[[[B"
+ - java.lang.Boolean
+ - "[Z"
+ - "[[Z"
+ - "[[[Z"
+ - java.math.BigDecimal
+ - java.util.Arrays
+ - java.util.Date
+ - java.util.List
+ - java.util.Map
+ - java.util.Set
+ - java.lang.Object
+ - org.joda.time.DateTime
+ - org.joda.time.DateTimeUtils
+ - org.joda.time.DateTimeZone
+ - org.joda.time.Instant
+ - org.elasticsearch.common.joda.time.DateTime
+ - org.elasticsearch.common.joda.time.DateTimeUtils
+ - org.elasticsearch.common.joda.time.DateTimeZone
+ - org.elasticsearch.common.joda.time.Instant
+ # Added for Cirrus
+ - org.apache.lucene.util.automaton.RegExp
+ - org.apache.lucene.util.automaton.CharacterRunAutomaton

-- 
To view, visit https://gerrit.wikimedia.org/r/158376
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I674160b8c423baee12a1626d1ffdd372f45ab018
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <never...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to