Index: Dev/branches/rest-dojo-ui/client/rft/elastic/ElasticReadStore.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/elastic/ElasticReadStore.js	(revision 365)
+++ Dev/branches/rest-dojo-ui/client/rft/elastic/ElasticReadStore.js	(revision 365)
@@ -0,0 +1,90 @@
+define(["dojo", "dojox", "dojo/json"], function(dojo, dojox, JSON) {
+	dojo.provide("rft.elastic.ElasticReadStore");
+
+	dojo.require("dojox.data.QueryReadStore");
+
+	dojo.declare("rft.elastic.ElasticReadStore", dojox.data.QueryReadStore, {
+	  fetch:function(request){
+	    request.serverQuery = dojo.toJson({ 
+	    						query: 
+	    						{
+	    							query_string: 
+	    							{
+	    								default_field: "title", 
+	    								query: request.query.title
+	    							}
+	    						}
+	    					});
+	    // Call superclasses' fetch
+	    return this.inherited("fetch", arguments);
+	  },
+
+	  fetch:function(/* Object? */ request){
+			//	summary:
+			//		See dojo.data.util.simpleFetch.fetch() this is just a copy and I adjusted
+			//		only the paging, since it happens on the server if doClientPaging is
+			//		false, thx to http://trac.dojotoolkit.org/ticket/4761 reporting this.
+			//		Would be nice to be able to use simpleFetch() to reduce copied code,
+			//		but i dont know how yet. Ideas please!
+			request = request || {};
+			if(!request.store){
+				request.store = this;
+			}
+			var self = this;
+		
+			var _errorHandler = function(errorData, requestObject){
+				if(requestObject.onError){
+					var scope = requestObject.scope || dojo.global;
+					requestObject.onError.call(scope, errorData, requestObject);
+				}
+			};
+		
+			var _fetchHandler = function(items, requestObject, numRows){
+				var oldAbortFunction = requestObject.abort || null;
+				var aborted = false;
+				
+				var startIndex = requestObject.start?requestObject.start:0;
+				if(self.doClientPaging == false){
+					// For client paging we dont need no slicing of the result.
+					startIndex = 0;
+				}
+				var endIndex = requestObject.count?(startIndex + requestObject.count):items.length;
+		
+				requestObject.abort = function(){
+					aborted = true;
+					if(oldAbortFunction){
+						oldAbortFunction.call(requestObject);
+					}
+				};
+		
+				var scope = requestObject.scope || dojo.global;
+				if(!requestObject.store){
+					requestObject.store = self;
+				}
+				if(requestObject.onBegin){
+					requestObject.onBegin.call(scope, numRows, requestObject);
+				}
+				if(requestObject.sort && self.doClientSorting){
+					items.sort(dojo.data.util.sorter.createSortFunction(requestObject.sort, self));
+				}
+				if(requestObject.onItem){
+					for(var i = startIndex; (i < items.length) && (i < endIndex); ++i){
+						var item = items[i];
+						if(!aborted){
+							requestObject.onItem.call(scope, item, requestObject);
+						}
+					}
+				}
+				if(requestObject.onComplete && !aborted){
+					var subset = null;
+					if(!requestObject.onItem){
+						subset = items.slice(startIndex, endIndex);
+					}
+					requestObject.onComplete.call(scope, subset, requestObject);
+				}
+			};
+			this._fetchItems(request, _fetchHandler, _errorHandler);
+			return request;	// Object
+		},
+	});
+})
Index: Dev/branches/rest-dojo-ui/client/rft/pages/session.html
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/session.html	(revision 364)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/session.html	(revision 365)
@@ -27,5 +27,8 @@
                         <fieldset class="align">
                             <label for="accountsInput">Add new</label>
+                            <select id="accountBox"></select>
+                            <!--
                             <input type="text" data-rft-attach-point="emailBox" data-dojo-type="dijit.form.TextBox" data-dojo-props="placeHolder: 'Enter email address here...'" />
+                            -->
                             <button data-rft-attach-point="btnInvite" data-dojo-type="dijit.form.Button" data-rft-attach-event="onClick:onInvite" data-dojo-props="baseClass: 'rftBlockButton', class: 'green', iconClass: 'rftIcon rftIconPlus'">Invite</button>
                             <br/><br/>
Index: Dev/branches/rest-dojo-ui/client/rft/pages/session.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/pages/session.js	(revision 364)
+++ Dev/branches/rest-dojo-ui/client/rft/pages/session.js	(revision 365)
@@ -3,4 +3,6 @@
 	'dojo/_base/event',
 	'dojo/_base/Deferred',
+    'dijit/form/FilteringSelect',
+    'rft/elastic/ElasticReadStore',
 	'rft/store',
 	'rft/ui/_Page',
@@ -8,5 +10,5 @@
     'rft/ui/AccountListView'
     ],
-	function(declare,lang,event,Deferred,store,_Page,content,AccountListView){
+	function(declare,lang,event,Deferred,FilteringSelect,ElasticReadStore,store,_Page,content,AccountListView){
 		return declare('rft.pages.session',[_Page],{
 			session: null,
@@ -19,4 +21,5 @@
                         this._refresh();
 					}));
+                    this._setupAutoComplete();
                     this._setupListView();
 				} else {
@@ -32,6 +35,6 @@
             },
             onInvite: function() {
-                this._addAccount({ title : this.emailBox.get('value') });
-                this.emailBox.set('value', "");
+                this._addAccount({ title : this.accountBox.get('value') });
+                this.accountBox.set('value', "");
             },
             onSave: function(evt) {
@@ -58,5 +61,27 @@
                 }).placeAt(this.listViewNode);
                 this.listView.startup();
+            },
+            _setupAutoComplete: function() {
+
+                var accountStore = new ElasticReadStore({
+                    url: "http://localhost:9200/rft/_search",
+                    requestMethod: "POST"
+                });
+                var accountText = new FilteringSelect({
+                    name: "accountBox",
+                    store: accountStore,
+                    autoComplete: false,
+                    required: true,
+                    labelType: "text",
+                    placeHolder: "Enter email address here...",
+                    pageSize: 10,
+                    hasDownArrow: false,
+                    style: "width: 400",
+                    searchAttr: "title",
+                    id: "accountText"
+                }, "accountBox");
+                accountText.startup();
             }
+
 
 		});
Index: Dev/branches/rest-dojo-ui/client/rft/run.js
===================================================================
--- Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 364)
+++ Dev/branches/rest-dojo-ui/client/rft/run.js	(revision 365)
@@ -28,5 +28,8 @@
     'dojox/grid/DataGrid',
     'dojox/widget/TitleGroup',
-    'rft/ui/List',
+    'dojox/data/QueryReadStore',
+    'rft/elastic/ElasticReadStore',
+    'rft/ui/ListView',
+    'rft/ui/AccountListView',
     'rft/ui/MainMenu',
     'rft/ui/MenuBarLink',
Index: Dev/branches/rest-dojo-ui/elasticsearch/LICENSE.txt
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/LICENSE.txt	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/LICENSE.txt	(revision 365)
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
Index: Dev/branches/rest-dojo-ui/elasticsearch/NOTICE.txt
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/NOTICE.txt	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/NOTICE.txt	(revision 365)
@@ -0,0 +1,5 @@
+ElasticSearch
+Copyright 2009-2011 ElasticSearch and Shay Banon
+
+This product includes software developed by The Apache Software
+Foundation (http://www.apache.org/).
Index: Dev/branches/rest-dojo-ui/elasticsearch/README.textile
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/README.textile	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/README.textile	(revision 365)
@@ -0,0 +1,223 @@
+h1. ElasticSearch
+
+h2. A Distributed RESTful Search Engine
+
+h3. "http://www.elasticsearch.org":http://www.elasticsearch.org
+
+ElasticSearch is a distributed RESTful search engine built for the cloud. Features include:
+
+* Distributed and Highly Available Search Engine.
+** Each index is fully sharded with a configurable number of shards.
+** Each shard can have one or more replicas.
+** Read / Search operations performed on either one of the replica shard.
+* Multi Tenant with Multi Types.
+** Support for more than one index.
+** Support for more than one type per index.
+** Index level configuration (number of shards, index storage, ...).
+* Various set of APIs
+** HTTP RESTful API
+** Native Java API.
+** All APIs perform automatic node operation rerouting.
+* Document oriented
+** No need for upfront schema definition.
+** Schema can be defined per type for customization of the indexing process.
+* Reliable, Asynchronous Write Behind for long term persistency.
+* (Near) Real Time Search.
+* Built on top of Lucene
+** Each shard is a fully functional Lucene index
+** All the power of Lucene easily exposed through simple configuration / plugins.
+* Per operation consistency
+** Single document level operations are atomic, consistent, isolated and durable.
+* Open Source under Apache 2 License.
+
+h2. Getting Started
+
+First of all, DON'T PANIC. It will take 5 minutes to get the gist of what ElasticSearch is all about.
+
+h3. Installation
+
+* "Download":http://www.elasticsearch.org/download and unzip the ElasticSearch official distribution.
+* Run @bin/elasticsearch -f@ on unix, or @bin/elasticsearch.bat@ on windows.
+* Run @curl -X GET http://localhost:9200/@.
+* Start more servers ...
+
+h3. Indexing
+
+Lets try and index some twitter like information. First, lets create a twitter user, and add some tweets (the @twitter@ index will be created automatically):
+
+<pre>
+curl -XPUT 'http://localhost:9200/twitter/user/kimchy' -d '{ "name" : "Shay Banon" }'
+
+curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '
+{ 
+    "user": "kimchy", 
+    "postDate": "2009-11-15T13:12:00", 
+    "message": "Trying out Elastic Search, so far so good?" 
+}'
+
+curl -XPUT 'http://localhost:9200/twitter/tweet/2' -d '
+{ 
+    "user": "kimchy", 
+    "postDate": "2009-11-15T14:12:12", 
+    "message": "Another tweet, will it be indexed?" 
+}'
+</pre>
+
+Now, lets see if the information was added by GETting it:
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/user/kimchy?pretty=true'
+curl -XGET 'http://localhost:9200/twitter/tweet/1?pretty=true'
+curl -XGET 'http://localhost:9200/twitter/tweet/2?pretty=true'
+</pre>
+
+h3. Searching
+
+Mmm search..., shouldn't it be elastic? 
+Lets find all the tweets that @kimchy@ posted:
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/tweet/_search?q=user:kimchy&pretty=true'
+</pre>
+
+We can also use the JSON query language ElasticSearch provides instead of a query string:
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/tweet/_search?pretty=true' -d '
+{ 
+    "query" : { 
+        "text" : { "user": "kimchy" }
+    } 
+}'
+</pre>
+
+Just for kicks, lets get all the documents stored (we should see the user as well):
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/_search?pretty=true' -d '
+{ 
+    "query" : { 
+        "matchAll" : {} 
+    } 
+}'
+</pre>
+
+We can also do range search (the @postDate@ was automatically identified as date)
+
+<pre>
+curl -XGET 'http://localhost:9200/twitter/_search?pretty=true' -d '
+{ 
+    "query" : { 
+        "range" : { 
+            "postDate" : { "from" : "2009-11-15T13:00:00", "to" : "2009-11-15T14:00:00" } 
+        } 
+    } 
+}'
+</pre>
+
+There are many more options to perform search, after all, its a search product no? All the familiar Lucene queries are available through the JSON query language, or through the query parser.
+
+h3. Multi Tenant - Indices and Types
+
+Maan, that twitter index might get big (in this case, index size == valuation). Lets see if we can structure our twitter system a bit differently in order to support such large amount of data.
+
+ElasticSearch support multiple indices, as well as multiple types per index. In the previous example we used an index called @twitter@, with two types, @user@ and @tweet@.
+
+Another way to define our simple twitter system is to have a different index per user (though note that an index has an overhead). Here is the indexing curl's in this case:
+
+<pre>
+curl -XPUT 'http://localhost:9200/kimchy/info/1' -d '{ "name" : "Shay Banon" }'
+
+curl -XPUT 'http://localhost:9200/kimchy/tweet/1' -d '
+{ 
+    "user": "kimchy", 
+    "postDate": "2009-11-15T13:12:00", 
+    "message": "Trying out Elastic Search, so far so good?" 
+}'
+
+curl -XPUT 'http://localhost:9200/kimchy/tweet/2' -d '
+{ 
+    "user": "kimchy", 
+    "postDate": "2009-11-15T14:12:12", 
+    "message": "Another tweet, will it be indexed?" 
+}'
+</pre>
+
+The above index information into the @kimchy@ index, with two types, @info@ and @tweet@. Each user will get his own special index.
+
+Complete control on the index level is allowed. As an example, in the above case, we would want to change from the default 5 shards with 1 replica per index, to only 1 shard with 1 replica per index (== per twitter user). Here is how this can be done (the configuration can be in yaml as well):
+
+<pre>
+curl -XPUT http://localhost:9200/another_user/ -d '
+{ 
+    "index" : { 
+        "numberOfShards" : 1, 
+        "numberOfReplicas" : 1 
+    } 
+}'
+</pre>
+
+Search (and similar operations) are multi index aware. This means that we can easily search on more than one
+index (twitter user), for example:
+
+<pre>
+curl -XGET 'http://localhost:9200/kimchy,another_user/_search?pretty=true' -d '
+{ 
+    "query" : { 
+        "matchAll" : {} 
+    } 
+}'
+</pre>
+
+Or on all the indices:
+
+<pre>
+curl -XGET 'http://localhost:9200/_search?pretty=true' -d '
+{ 
+    "query" : { 
+        "matchAll" : {} 
+    } 
+}'
+</pre>
+
+{One liner teaser}: And the cool part about that? You can easily search on multiple twitter users (indices), with different boost levels per user (index), making social search so much simpler (results from my friends rank higher than results from my friends friends).
+
+h3. Distributed, Highly Available
+
+Lets face it, things will fail....
+
+ElasticSearch is a highly available and distributed search engine. Each index is broken down into shards, and each shard can have one or more replica. By default, an index is created with 5 shards and 1 replica per shard (5/1). There are many topologies that can be used, including 1/10 (improve search performance), or 20/1 (improve indexing performance, with search executed in a map reduce fashion across shards).
+
+In order to play with Elastic Search distributed nature, simply bring more nodes up and shut down nodes. The system will continue to serve requests (make sure you use the correct http port) with the latest data indexed.
+
+h3. Where to go from here?
+
+We have just covered a very small portion of what ElasticSearch is all about. For more information, please refer to: .
+
+h3. Building from Source
+
+ElasticSearch uses "Maven":http://maven.apache.org for its build system.
+
+In order to create a distribution, simply run the @mvn package -DskipTests@ command in the cloned directory.
+
+The distribution will be created under @target/releases@.
+
+h1. License
+
+<pre>
+This software is licensed under the Apache 2 license, quoted below.
+
+Copyright 2009-2011 Shay Banon and ElasticSearch <http://www.elasticsearch.org>
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+</pre>
Index: Dev/branches/rest-dojo-ui/elasticsearch/bin/elasticsearch
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/bin/elasticsearch	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/bin/elasticsearch	(revision 365)
@@ -0,0 +1,181 @@
+#!/bin/sh
+
+# OPTIONS:
+#   -f: start in the foreground
+#   -p <filename>: log the pid to a file (useful to kill it later)
+
+# CONTROLLING STARTUP:
+#
+# This script relies on few environment variables to determine startup
+# behavior, those variables are:
+#
+#   ES_CLASSPATH -- A Java classpath containing everything necessary to run.
+#   JAVA_OPTS    -- Additional arguments to the JVM for heap size, etc
+#   ES_JAVA_OPTS -- External Java Opts on top of the defaults set
+#
+#
+# Optionally, exact memory values can be set using the following values, note,
+# they can still be set using the `ES_JAVA_OPTS`. Sample format include "512m", and "10g".
+#
+#   ES_HEAP_SIZE -- Sets both the minimum and maximum memory to allocate (recommended)
+#
+# As a convenience, a fragment of shell is sourced in order to set one or
+# more of these variables. This so-called `include' can be placed in a
+# number of locations and will be searched for in order. The lowest
+# priority search path is the same directory as the startup script, and
+# since this is the location of the sample in the project tree, it should
+# almost work Out Of The Box.
+#
+# Any serious use-case though will likely require customization of the
+# include. For production installations, it is recommended that you copy
+# the sample to one of /usr/share/elasticsearch/elasticsearch.in.sh,
+# /usr/local/share/elasticsearch/elasticsearch.in.sh, or
+# /opt/elasticsearch/elasticsearch.in.sh and make your modifications there.
+#
+# Another option is to specify the full path to the include file in the
+# environment. For example:
+#
+#   $ ES_INCLUDE=/path/to/in.sh elasticsearch -p /var/run/es.pid
+#
+# Note: This is particularly handy for running multiple instances on a
+# single installation, or for quick tests.
+#
+# If you would rather configure startup entirely from the environment, you
+# can disable the include by exporting an empty ES_INCLUDE, or by
+# ensuring that no include files exist in the aforementioned search list.
+# Be aware that you will be entirely responsible for populating the needed
+# environment variables.
+
+CDPATH=""
+SCRIPT="$0"
+
+# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
+while [ -h "$SCRIPT" ] ; do
+  ls=`ls -ld "$SCRIPT"`
+  # Drop everything prior to ->
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    SCRIPT="$link"
+  else
+    SCRIPT=`dirname "$SCRIPT"`/"$link"
+  fi
+done
+
+# determine elasticsearch home
+ES_HOME=`dirname "$SCRIPT"`/..
+
+# make ELASTICSEARCH_HOME absolute
+ES_HOME=`cd "$ES_HOME"; pwd`
+
+
+# If an include wasn't specified in the environment, then search for one...
+if [ "x$ES_INCLUDE" = "x" ]; then
+    # Locations (in order) to use when searching for an include file.
+    for include in /usr/share/elasticsearch/elasticsearch.in.sh \
+                   /usr/local/share/elasticsearch/elasticsearch.in.sh \
+                   /opt/elasticsearch/elasticsearch.in.sh \
+                   ~/.elasticsearch.in.sh \
+                   `dirname "$0"`/elasticsearch.in.sh; do
+        if [ -r "$include" ]; then
+            . "$include"
+            break
+        fi
+    done
+# ...otherwise, source the specified include.
+elif [ -r "$ES_INCLUDE" ]; then
+    . "$ES_INCLUDE"
+fi
+
+if [ -x "$JAVA_HOME/bin/java" ]; then
+    JAVA=$JAVA_HOME/bin/java
+else
+    JAVA=`which java`
+fi
+
+if [ -z "$ES_CLASSPATH" ]; then
+    echo "You must set the ES_CLASSPATH var" >&2
+    exit 1
+fi
+
+# Special-case path variables.
+case `uname` in
+    CYGWIN*)
+        ES_CLASSPATH=`cygpath -p -w "$ES_CLASSPATH"`
+        ES_HOME=`cygpath -p -w "$ES_HOME"`
+    ;;
+esac
+
+launch_service()
+{
+    pidpath=$1
+    foreground=$2
+    props=$3
+    es_parms="-Delasticsearch"
+
+    if [ "x$pidpath" != "x" ]; then
+        es_parms="$es_parms -Des.pidfile=$pidpath"
+    fi
+
+    # The es-foreground option will tell ElasticSearch not to close stdout/stderr, but it's up to us not to background.
+    if [ "x$foreground" != "x" ]; then
+        es_parms="$es_parms -Des.foreground=yes"
+        exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props \
+                org.elasticsearch.bootstrap.ElasticSearch
+        execval=$?
+    else
+        # Startup ElasticSearch, background it, and write the pid.
+        exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props \
+                    org.elasticsearch.bootstrap.ElasticSearch <&- &
+        execval=$?
+        [ ! -z "$pidpath" ] && printf '%d' $! > "$pidpath"
+    fi
+
+    return $execval
+}
+
+# Parse any command line options.
+args=`getopt vfhp:D:X: "$@"`
+eval set -- "$args"
+
+while true; do
+    case $1 in
+        -v)
+            "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props \
+                    org.elasticsearch.Version
+            exit 0
+        ;;
+        -p)
+            pidfile="$2"
+            shift 2
+        ;;
+        -f)
+            foreground="yes"
+            shift
+        ;;
+        -h)
+            echo "Usage: $0 [-f] [-h] [-p pidfile]"
+            exit 0
+        ;;
+        -D)
+            properties="$properties -D$2"
+            shift 2
+        ;;
+        -X)
+            properties="$properties -X$2"
+            shift 2
+        ;;
+        --)
+            shift
+            break
+        ;;
+        *)
+            echo "Error parsing arguments!" >&2
+            exit 1
+        ;;
+    esac
+done
+
+# Start up the service
+launch_service "$pidfile" "$foreground" "$properties"
+
+exit $?
Index: Dev/branches/rest-dojo-ui/elasticsearch/bin/elasticsearch.bat
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/bin/elasticsearch.bat	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/bin/elasticsearch.bat	(revision 365)
@@ -0,0 +1,75 @@
+@echo off
+
+SETLOCAL
+
+if NOT DEFINED JAVA_HOME goto err
+
+set SCRIPT_DIR=%~dp0
+for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI
+
+
+REM ***** JAVA options *****
+
+if "%ES_MIN_MEM%" == "" (
+set ES_MIN_MEM=256m
+)
+
+if "%ES_MAX_MEM%" == "" (
+set ES_MAX_MEM=1g
+)
+
+if NOT "%ES_HEAP_SIZE%" == "" (
+set ES_MIN_MEM=%ES_HEAP_SIZE%
+set ES_MAX_MEM=%ES_HEAP_SIZE%
+)
+
+set JAVA_OPTS=%JAVA_OPTS% -Xms%ES_MIN_MEM% -Xmx%ES_MAX_MEM%
+
+if NOT "%ES_HEAP_NEWSIZE%" == "" (
+set JAVA_OPTS=%JAVA_OPTS% -Xmn%ES_HEAP_NEWSIZE%
+)
+
+set JAVA_OPTS=%JAVA_OPTS% -Xss256k
+
+REM Enable aggressive optimizations in the JVM
+REM    - Disabled by default as it might cause the JVM to crash
+REM set JAVA_OPTS=%JAVA_OPTS% -XX:+AggressiveOpts
+
+set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParNewGC
+set JAVA_OPTS=%JAVA_OPTS% -XX:+UseConcMarkSweepGC
+
+set JAVA_OPTS=%JAVA_OPTS% -XX:CMSInitiatingOccupancyFraction=75
+set JAVA_OPTS=%JAVA_OPTS% -XX:+UseCMSInitiatingOccupancyOnly
+
+REM When running under Java 7
+REM JAVA_OPTS=%JAVA_OPTS% -XX:+UseCondCardMark
+
+REM GC logging options -- uncomment to enable
+REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDetails
+REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCTimeStamps
+REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintClassHistogram
+REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintTenuringDistribution
+REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCApplicationStoppedTime
+REM JAVA_OPTS=%JAVA_OPTS% -Xloggc:/var/log/elasticsearch/gc.log
+
+REM Causes the JVM to dump its heap on OutOfMemory.
+set JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError
+REM The path to the heap dump location, note directory must exists and have enough
+REM space for a full heap dump.
+REM JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof
+
+set ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/elasticsearch-0.19.8.jar;%ES_HOME%/lib/*;%ES_HOME%/lib/sigar/*
+set ES_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES_HOME%"
+
+"%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% %* -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.ElasticSearch"
+goto finally
+
+
+:err
+echo JAVA_HOME environment variable must be set!
+pause
+
+
+:finally
+
+ENDLOCAL
Index: Dev/branches/rest-dojo-ui/elasticsearch/bin/elasticsearch.in.sh
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/bin/elasticsearch.in.sh	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/bin/elasticsearch.in.sh	(revision 365)
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+ES_CLASSPATH=$ES_CLASSPATH:$ES_HOME/lib/elasticsearch-0.19.8.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*
+
+if [ "x$ES_MIN_MEM" = "x" ]; then
+    ES_MIN_MEM=256m
+fi
+if [ "x$ES_MAX_MEM" = "x" ]; then
+    ES_MAX_MEM=1g
+fi
+if [ "x$ES_HEAP_SIZE" != "x" ]; then
+    ES_MIN_MEM=$ES_HEAP_SIZE
+    ES_MAX_MEM=$ES_HEAP_SIZE
+fi
+
+# min and max heap sizes should be set to the same value to avoid
+# stop-the-world GC pauses during resize, and so that we can lock the
+# heap in memory on startup to prevent any of it from being swapped
+# out.
+JAVA_OPTS="$JAVA_OPTS -Xms${ES_MIN_MEM}"
+JAVA_OPTS="$JAVA_OPTS -Xmx${ES_MAX_MEM}"
+
+# new generation
+if [ "x$ES_HEAP_NEWSIZE" != "x" ]; then
+    JAVA_OPTS="$JAVA_OPTS -Xmn${ES_HEAP_NEWSIZE}"
+fi
+
+# reduce the per-thread stack size
+JAVA_OPTS="$JAVA_OPTS -Xss256k"
+
+# set to headless, just in case
+JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"
+
+# Force the JVM to use IPv4 stack
+# JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
+
+# Enable aggressive optimizations in the JVM
+#    - Disabled by default as it might cause the JVM to crash
+# JAVA_OPTS="$JAVA_OPTS -XX:+AggressiveOpts"
+
+JAVA_OPTS="$JAVA_OPTS -XX:+UseParNewGC"
+JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC"
+
+JAVA_OPTS="$JAVA_OPTS -XX:CMSInitiatingOccupancyFraction=75"
+JAVA_OPTS="$JAVA_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
+
+# When running under Java 7
+#JAVA_OPTS="$JAVA_OPTS -XX:+UseCondCardMark"
+
+# GC logging options -- uncomment to enable
+# JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCDetails"
+# JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCTimeStamps"
+# JAVA_OPTS="$JAVA_OPTS -XX:+PrintClassHistogram"
+# JAVA_OPTS="$JAVA_OPTS -XX:+PrintTenuringDistribution"
+# JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCApplicationStoppedTime"
+# JAVA_OPTS="$JAVA_OPTS -Xloggc:/var/log/elasticsearch/gc.log"
+
+# Causes the JVM to dump its heap on OutOfMemory.
+JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
+# The path to the heap dump location, note directory must exists and have enough
+# space for a full heap dump.
+#JAVA_OPTS="$JAVA_OPTS -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof"
Index: Dev/branches/rest-dojo-ui/elasticsearch/bin/plugin
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/bin/plugin	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/bin/plugin	(revision 365)
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+CDPATH=""
+SCRIPT="$0"
+
+# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
+while [ -h "$SCRIPT" ] ; do
+  ls=`ls -ld "$SCRIPT"`
+  # Drop everything prior to ->
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    SCRIPT="$link"
+  else
+    SCRIPT=`dirname "$SCRIPT"`/"$link"
+  fi
+done
+
+# determine elasticsearch home
+ES_HOME=`dirname "$SCRIPT"`/..
+
+# make ELASTICSEARCH_HOME absolute
+ES_HOME=`cd "$ES_HOME"; pwd`
+
+
+if [ -x "$JAVA_HOME/bin/java" ]; then
+    JAVA=$JAVA_HOME/bin/java
+else
+    JAVA=`which java`
+fi
+
+exec $JAVA -Xmx64m -Xms16m -Delasticsearch -Des.path.home="$ES_HOME" -cp "$ES_HOME/lib/*" org.elasticsearch.plugins.PluginManager $*
Index: Dev/branches/rest-dojo-ui/elasticsearch/bin/plugin.bat
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/bin/plugin.bat	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/bin/plugin.bat	(revision 365)
@@ -0,0 +1,22 @@
+@echo off
+
+SETLOCAL
+
+if NOT DEFINED JAVA_HOME goto err
+
+set SCRIPT_DIR=%~dp0
+for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI
+
+
+"%JAVA_HOME%\bin\java" -Xmx64m -Xms16m -Des.path.home="%ES_HOME%" -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginManager" %*
+goto finally
+
+
+:err
+echo JAVA_HOME environment variable must be set!
+pause
+
+
+:finally
+
+ENDLOCAL
Index: Dev/branches/rest-dojo-ui/elasticsearch/config/elasticsearch.yml
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/config/elasticsearch.yml	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/config/elasticsearch.yml	(revision 365)
@@ -0,0 +1,360 @@
+##################### ElasticSearch Configuration Example #####################
+
+# This file contains an overview of various configuration settings,
+# targeted at operations staff. Application developers should
+# consult the guide at <http://elasticsearch.org/guide>.
+#
+# The installation procedure is covered at
+# <http://elasticsearch.org/guide/reference/setup/installation.html>.
+#
+# ElasticSearch comes with reasonable defaults for most settings,
+# so you can try it out without bothering with configuration.
+#
+# Most of the time, these defaults are just fine for running a production
+# cluster. If you're fine-tuning your cluster, or wondering about the
+# effect of certain configuration option, please _do ask_ on the
+# mailing list or IRC channel [http://elasticsearch.org/community].
+
+# Any element in the configuration can be replaced with environment variables
+# by placing them in ${...} notation. For example:
+#
+# node.rack: ${RACK_ENV_VAR}
+
+# See <http://elasticsearch.org/guide/reference/setup/configuration.html>
+# for information on supported formats and syntax for the configuration file.
+
+
+################################### Cluster ###################################
+
+# Cluster name identifies your cluster for auto-discovery. If you're running
+# multiple clusters on the same network, make sure you're using unique names.
+#
+cluster.name: rft
+
+
+#################################### Node #####################################
+
+# Node names are generated dynamically on startup, so you're relieved
+# from configuring them manually. You can tie this node to a specific name:
+#
+# node.name: "Franz Kafka"
+
+# Every node can be configured to allow or deny being eligible as the master,
+# and to allow or deny to store the data.
+#
+# Allow this node to be eligible as a master node (enabled by default):
+#
+# node.master: true
+#
+# Allow this node to store data (enabled by default):
+#
+# node.data: true
+
+# You can exploit these settings to design advanced cluster topologies.
+#
+# 1. You want this node to never become a master node, only to hold data.
+#    This will be the "workhorse" of your cluster.
+#
+# node.master: false
+# node.data: true
+#
+# 2. You want this node to only serve as a master: to not store any data and
+#    to have free resources. This will be the "coordinator" of your cluster.
+#
+# node.master: true
+# node.data: false
+#
+# 3. You want this node to be neither master nor data node, but
+#    to act as a "search load balancer" (fetching data from nodes,
+#    aggregating results, etc.)
+#
+# node.master: false
+# node.data: false
+
+# Use the Cluster Health API [http://localhost:9200/_cluster/health], the
+# Node Info API [http://localhost:9200/_cluster/nodes] or GUI tools
+# such as <http://github.com/lukas-vlcek/bigdesk> and
+# <http://mobz.github.com/elasticsearch-head> to inspect the cluster state.
+
+# A node can have generic attributes associated with it, which can later be used
+# for customized shard allocation filtering, or allocation awareness. An attribute
+# is a simple key value pair, similar to node.key: value, here is an example:
+#
+# node.rack: rack314
+
+# By default, multiple nodes are allowed to start from the same installation location
+# to disable it, set the following:
+# node.max_local_storage_nodes: 1
+
+
+#################################### Index ####################################
+
+# You can set a number of options (such as shard/replica options, mapping
+# or analyzer definitions, translog settings, ...) for indices globally,
+# in this file.
+#
+# Note, that it makes more sense to configure index settings specifically for
+# a certain index, either when creating it or by using the index templates API.
+#
+# See <http://elasticsearch.org/guide/reference/index-modules/> and
+# <http://elasticsearch.org/guide/reference/api/admin-indices-create-index.html>
+# for more information.
+
+# Set the number of shards (splits) of an index (5 by default):
+#
+# index.number_of_shards: 5
+
+# Set the number of replicas (additional copies) of an index (1 by default):
+#
+# index.number_of_replicas: 1
+
+# Note, that for development on a local machine, with small indices, it usually
+# makes sense to "disable" the distributed features:
+#
+# index.number_of_shards: 1
+# index.number_of_replicas: 0
+
+# These settings directly affect the performance of index and search operations
+# in your cluster. Assuming you have enough machines to hold shards and
+# replicas, the rule of thumb is:
+#
+# 1. Having more *shards* enhances the _indexing_ performance and allows to
+#    _distribute_ a big index across machines.
+# 2. Having more *replicas* enhances the _search_ performance and improves the
+#    cluster _availability_.
+#
+# The "number_of_shards" is a one-time setting for an index.
+#
+# The "number_of_replicas" can be increased or decreased anytime,
+# by using the Index Update Settings API.
+#
+# ElasticSearch takes care about load balancing, relocating, gathering the
+# results from nodes, etc. Experiment with different settings to fine-tune
+# your setup.
+
+# Use the Index Status API (<http://localhost:9200/A/_status>) to inspect
+# the index status.
+
+
+#################################### Paths ####################################
+
+# Path to directory containing configuration (this file and logging.yml):
+#
+# path.conf: /path/to/conf
+
+# Path to directory where to store index data allocated for this node.
+#
+# path.data: /path/to/data
+#
+# Can optionally include more than one location, causing data to be striped across
+# the locations (Ã  la RAID 0) on a file level, favouring locations with most free
+# space on creation. For example:
+#
+# path.data: /path/to/data1,/path/to/data2
+
+# Path to temporary files:
+#
+# path.work: /path/to/work
+
+# Path to log files:
+#
+# path.logs: /path/to/logs
+
+# Path to where plugins are installed:
+#
+# path.plugins: /path/to/plugins
+
+
+#################################### Plugin ###################################
+
+# If a plugin listed here is not installed for current node, the node will not start.
+#
+# plugin.mandatory: mapper-attachments,lang-groovy
+
+
+################################### Memory ####################################
+
+# ElasticSearch performs poorly when JVM starts swapping: you should ensure that
+# it _never_ swaps.
+#
+# Set this property to true to lock the memory:
+#
+# bootstrap.mlockall: true
+
+# Make sure that the ES_MIN_MEM and ES_MAX_MEM environment variables are set
+# to the same value, and that the machine has enough memory to allocate
+# for ElasticSearch, leaving enough memory for the operating system itself.
+#
+# You should also make sure that the ElasticSearch process is allowed to lock
+# the memory, eg. by using `ulimit -l unlimited`.
+
+
+############################## Network And HTTP ###############################
+
+# ElasticSearch, by default, binds itself to the 0.0.0.0 address, and listens
+# on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node
+# communication. (the range means that if the port is busy, it will automatically
+# try the next port).
+
+# Set the bind address specifically (IPv4 or IPv6):
+#
+network.bind_host: localhost
+
+# Set the address other nodes will use to communicate with this node. If not
+# set, it is automatically derived. It must point to an actual IP address.
+#
+# network.publish_host: 192.168.0.1
+
+# Set both 'bind_host' and 'publish_host':
+#
+network.host: localhost
+
+# Set a custom port for the node to node communication (9300 by default):
+#
+# transport.tcp.port: 9300
+
+# Enable compression for all communication between nodes (disabled by default):
+#
+# transport.tcp.compress: true
+
+# Set a custom port to listen for HTTP traffic:
+#
+# http.port: 9200
+
+# Set a custom allowed content length:
+#
+# http.max_content_length: 100mb
+
+# Disable HTTP completely:
+#
+# http.enabled: false
+
+
+################################### Gateway ###################################
+
+# The gateway allows for persisting the cluster state between full cluster
+# restarts. Every change to the state (such as adding an index) will be stored
+# in the gateway, and when the cluster starts up for the first time,
+# it will read its state from the gateway.
+
+# There are several types of gateway implementations. For more information,
+# see <http://elasticsearch.org/guide/reference/modules/gateway>.
+
+# The default gateway type is the "local" gateway (recommended):
+#
+# gateway.type: local
+
+# Settings below control how and when to start the initial recovery process on
+# a full cluster restart (to reuse as much local data as possible when using shared
+# gateway).
+
+# Allow recovery process after N nodes in a cluster are up:
+#
+# gateway.recover_after_nodes: 1
+
+# Set the timeout to initiate the recovery process, once the N nodes
+# from previous setting are up (accepts time value):
+#
+# gateway.recover_after_time: 5m
+
+# Set how many nodes are expected in this cluster. Once these N nodes
+# are up (and recover_after_nodes is met), begin recovery process immediately
+# (without waiting for recover_after_time to expire):
+#
+# gateway.expected_nodes: 2
+
+
+############################# Recovery Throttling #############################
+
+# These settings allow to control the process of shards allocation between
+# nodes during initial recovery, replica allocation, rebalancing,
+# or when adding and removing nodes.
+
+# Set the number of concurrent recoveries happening on a node:
+#
+# 1. During the initial recovery
+#
+# cluster.routing.allocation.node_initial_primaries_recoveries: 4
+#
+# 2. During adding/removing nodes, rebalancing, etc
+#
+# cluster.routing.allocation.node_concurrent_recoveries: 2
+
+# Set to throttle throughput when recovering (eg. 100mb, by default unlimited):
+#
+# indices.recovery.max_size_per_sec: 0
+
+# Set to limit the number of open concurrent streams when
+# recovering a shard from a peer:
+#
+# indices.recovery.concurrent_streams: 5
+
+
+################################## Discovery ##################################
+
+# Discovery infrastructure ensures nodes can be found within a cluster
+# and master node is elected. Multicast discovery is the default.
+
+# Set to ensure a node sees N other master eligible nodes to be considered
+# operational within the cluster. Set this option to a higher value (2-4)
+# for large clusters (>3 nodes):
+#
+# discovery.zen.minimum_master_nodes: 1
+
+# Set the time to wait for ping responses from other nodes when discovering.
+# Set this option to a higher value on a slow or congested network
+# to minimize discovery failures:
+#
+# discovery.zen.ping.timeout: 3s
+
+# See <http://elasticsearch.org/guide/reference/modules/discovery/zen.html>
+# for more information.
+
+# Unicast discovery allows to explicitly control which nodes will be used
+# to discover the cluster. It can be used when multicast is not present,
+# or to restrict the cluster communication-wise.
+#
+# 1. Disable multicast discovery (enabled by default):
+#
+# discovery.zen.ping.multicast.enabled: false
+#
+# 2. Configure an initial list of master nodes in the cluster
+#    to perform discovery when new nodes (master or data) are started:
+#
+# discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"]
+
+# EC2 discovery allows to use AWS EC2 API in order to perform discovery.
+#
+# You have to install the cloud-aws plugin for enabling the EC2 discovery.
+#
+# See <http://elasticsearch.org/guide/reference/modules/discovery/ec2.html>
+# for more information.
+#
+# See <http://elasticsearch.org/tutorials/2011/08/22/elasticsearch-on-ec2.html>
+# for a step-by-step tutorial.
+
+
+################################## Slow Log ##################################
+
+# Shard level query and fetch threshold logging.
+
+#index.search.slowlog.level: TRACE
+#index.search.slowlog.threshold.query.warn: 10s
+#index.search.slowlog.threshold.query.info: 5s
+#index.search.slowlog.threshold.query.debug: 2s
+#index.search.slowlog.threshold.query.trace: 500ms
+
+#index.search.slowlog.threshold.fetch.warn: 1s
+#index.search.slowlog.threshold.fetch.info: 800ms
+#index.search.slowlog.threshold.fetch.debug: 500ms
+#index.search.slowlog.threshold.fetch.trace: 200ms
+
+################################## GC Logging ################################
+
+#monitor.jvm.gc.ParNew.warn: 1000ms
+#monitor.jvm.gc.ParNew.info: 700ms
+#monitor.jvm.gc.ParNew.debug: 400ms
+
+#monitor.jvm.gc.ConcurrentMarkSweep.warn: 10s
+#monitor.jvm.gc.ConcurrentMarkSweep.info: 5s
+#monitor.jvm.gc.ConcurrentMarkSweep.debug: 2s
Index: Dev/branches/rest-dojo-ui/elasticsearch/config/logging.yml
===================================================================
--- Dev/branches/rest-dojo-ui/elasticsearch/config/logging.yml	(revision 365)
+++ Dev/branches/rest-dojo-ui/elasticsearch/config/logging.yml	(revision 365)
@@ -0,0 +1,44 @@
+rootLogger: INFO, console, file
+logger:
+  # log action execution errors for easier debugging
+  action: DEBUG
+  # reduce the logging for aws, too much is logged under the default INFO
+  com.amazonaws: WARN
+
+  # gateway
+  #gateway: DEBUG
+  #index.gateway: DEBUG
+
+  # peer shard recovery
+  #indices.recovery: DEBUG
+
+  # discovery
+  #discovery: TRACE
+
+  index.search.slowlog: TRACE, index_search_slow_log_file
+
+additivity:
+  index.search.slowlog: false
+
+appender:
+  console:
+    type: console
+    layout:
+      type: consolePattern
+      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
+
+  file:
+    type: dailyRollingFile
+    file: ${path.logs}/${cluster.name}.log
+    datePattern: "'.'yyyy-MM-dd"
+    layout:
+      type: pattern
+      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
+
+  index_search_slow_log_file:
+    type: dailyRollingFile
+    file: ${path.logs}/${cluster.name}_index_search_slowlog.log
+    datePattern: "'.'yyyy-MM-dd"
+    layout:
+      type: pattern
+      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
