incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/2] git commit: Updating the documentation.
Date Thu, 13 Feb 2014 14:20:25 GMT
Updating the documentation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/5acb8252
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/5acb8252
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/5acb8252

Branch: refs/heads/apache-blur-0.2
Commit: 5acb82524e2bdd617b9751266e8d3e16226f59ef
Parents: 0947c5c
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Thu Feb 13 09:18:49 2014 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Thu Feb 13 09:18:49 2014 -0500

----------------------------------------------------------------------
 docs/getting-started.html | 26 +++++++++++++-------------
 docs/using-blur.base.html | 33 +++++++++++++++++++++++++++++++++
 docs/using-blur.html      | 39 ++++++++++++++++++++++++++++++++++++---
 3 files changed, 82 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5acb8252/docs/getting-started.html
----------------------------------------------------------------------
diff --git a/docs/getting-started.html b/docs/getting-started.html
index 1eac42c..3ee4708 100644
--- a/docs/getting-started.html
+++ b/docs/getting-started.html
@@ -81,7 +81,7 @@
               You will at a minimum need the following:
             </p>
             <ul>
-              <li>Java 6 installed (Java 7 has not been tested)</li>
+              <li>Java 6 or Java 7 (Java 7 is recommended)</li>
             </ul>
             <h3>Setup passphraseless ssh</h3>
             <p>These instructions are taken from the Hadoop Quick Start Guide.</p>
@@ -99,7 +99,7 @@ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys</code></pre>
             <h3>Download Source and Binary Artifacts</h3>
             <p>
 	Both the source and binary artifacts are provided via mirrors here:<br/><br/>
-              <a href="http://www.apache.org/dyn/closer.cgi/incubator/blur/0.2.1-incubating/apache-blur-0.2.1-incubating-src.tar.gz"
class="btn btn-large btn-primary">Apache Blur 0.2.1 Source</a>               <a
href="http://www.apache.org/dyn/closer.cgi/incubator/blur/0.2.1-incubating/apache-blur-0.2.1-incubating-bin.tar.gz"
class="btn btn-large btn-primary">Apache Blur 0.2.1 Binary</a>
+              <a href="http://www.apache.org/dyn/closer.cgi/incubator/blur/0.2.2-incubating/apache-blur-0.2.2-incubating-src.tar.gz"
class="btn btn-large btn-primary">Apache Blur 0.2.2 Source</a>               <a
href="http://www.apache.org/dyn/closer.cgi/incubator/blur/0.2.2-incubating/apache-blur-0.2.2-incubating-bin.tar.gz"
class="btn btn-large btn-primary">Apache Blur 0.2.2 Binary</a>
             </p>
           </section>
           <section>
@@ -114,7 +114,7 @@ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys</code></pre>
             <p>Build the artifacts (if you want to run the tests remove the "-DskipTests")</p>
             <pre><code class="bash">cd incubator-blur/
 mvn install -DskipTests</code></pre>
-            <p>The binary artifact is located <code>distribution/target/apache-blur-0.2.1-incubating-bin.tar.gz</code>.</p>
+            <p>The binary artifact is located <code>distribution/target/apache-blur-0.2.2-incubating-bin.tar.gz</code>.</p>
           </section>
           <section>
             <div class="page-header">
@@ -155,12 +155,12 @@ mvn install -DskipTests</code></pre>
             <p>
               You should see:
             </p>
-            <pre><code class="bash">blur@blurvm:~$ apache-blur-0.2.1-incubating/bin/start-all.sh

+            <pre><code class="bash">blur@blurvm:~$ apache-blur-0.2.2-incubating/bin/start-all.sh

 localhost: ZooKeeper starting as process 6650.
 localhost: Shard [0] starting as process 6783.
 localhost: Controller [0] starting as process 6933.</code></pre>
             <p>If you run the start command again you should see:</p>
-            <pre><code class="bash">blur@blurvm:~$ apache-blur-0.2.1-incubating/bin/stop-all.sh

+            <pre><code class="bash">blur@blurvm:~$ apache-blur-0.2.2-incubating/bin/stop-all.sh

 localhost: Stopping Controller [0] server with pid [6933].
 localhost: Stopping Shard [0] server with pid [6783].
 localhost: Stopping ZooKeeper with pid [6650].</code></pre>
@@ -189,21 +189,23 @@ localhost: Stopping ZooKeeper with pid [6650].</code></pre>
             </p>
 <h3 id="shell-create">Create Table</h3>
 <p>
+            <pre><code class="bash">blur> #Creates a table called testtable
in the hdfs directory of /data/testtable with 11 shards
+blur> create -t testtable -c 11 -l hdfs://namenode/data/testtable
+</code></pre>
+            <div class="bs-callout bs-callout-info"><h4>Note</h4><p>The
local directory can be used however the integrity of the data may be compromised.</p></div>
             <pre><code class="bash">blur> #Creates a table called testtable
in the local directory of /data/testtable with 11 shards
 blur> create -t testtable -c 11 -l file:///data/testtable
 </code></pre>
 </p>
 <h3 id="shell-mutate">Mutate</h3>
 <p>
-<pre><code class="bash">
-blur> #Adds a row to testtable
+<pre><code class="bash">blur> #Adds a row to testtable
 blur> mutate testtable rowid1 recordid1 fam0 col1:value1
 </code></pre>
 </p>
 <h3 id="shell-query">Query</h3>
 <p>
-<pre><code class="bash">
-blur> #Runs a query on testtable
+<pre><code class="bash">blur> #Runs a query on testtable
 blur> query testtable fam0.col1:value1
  - Results Summary -
     total : 1
@@ -223,16 +225,14 @@ blur> query testtable fam0.col1:value1
 </p>
 <h3 id="shell-enable-highlighting">Enable Highlighting</h3>
 <p>
-<pre><code class="bash">
-blur> #Turns highlighting on
+<pre><code class="bash">blur> #Turns highlighting on
 blur> highlight
 highlight of query command is now on
 </code></pre>
 </p>
 <h3 id="shell-query-highlight">Query with Highlights</h3>
 <p>
-<pre><code class="bash">
-blur> #Runs a query on testtable with highlighting on, notice &lt;&lt;&lt;value1&gt;&gt;&gt;
is highlighted 
+<pre><code class="bash">blur> #Runs a query on testtable with highlighting
on, notice &lt;&lt;&lt;value1&gt;&gt;&gt; is highlighted 
 blur> query testtable2 fam0.col1:value1
  - Results Summary -
     total : 1

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5acb8252/docs/using-blur.base.html
----------------------------------------------------------------------
diff --git a/docs/using-blur.base.html b/docs/using-blur.base.html
index 4f31c81..d70e443 100644
--- a/docs/using-blur.base.html
+++ b/docs/using-blur.base.html
@@ -63,6 +63,7 @@
 	            </li>
                 <li><a href="#simple_query_example">Query Example</a></li>
                 <li><a href="#simple_query_example_data">Query Example with Data</a></li>
+                <li><a href="#simple_query_sorting">Query Example with Sorting</a></li>
                 <li><a href="#simple_faceting_example">Faceting Example</a></li>
                 <li><a href="#simple_fetch_data">Fetch Data</a></li>
                 <li><a href="#simple_mutate_example">Mutate Example</a></li>
@@ -203,6 +204,38 @@ for (BlurResult result : results.getResults()) {
 }
 </code></pre>
 
+
+
+<h3 id="simple_query_sorting">Query Example with Sorting</h3>
+<p>
+This is an example of how to run a query via the Thrift API and get back search results with
+ data being sorted by the &quot;docs.timestamp&quot; column. All the columns in the
records 
+will be returned.
+<div class="bs-callout bs-callout-info"><h4>Note</h4>Sorting is only allowed
on Record queries at this point.</div>
+</p>
+<pre><code class="java">Iface client = BlurClient.getClient("controller1:40010,controller2:40010");
+
+Query query = new Query();
+query.setQuery(&quot;+docs.body:\&quot;Hadoop is awesome\&quot;&quot;);
+query.setRowQuery(false);
+
+Selector selector = new Selector();
+selector.setRecordOnly(true);
+
+BlurQuery blurQuery = new BlurQuery();
+blurQuery.setQuery(query);
+blurQuery.setSelector(selector);
+blurQuery.addToSortFields(new SortField(&quot;docs&quot;, &quot;timestamp&quot;,
true));
+
+BlurResults results = client.query(&quot;table1&quot;, blurQuery);
+System.out.println(&quot;Total Results: &quot; + results.totalResults);
+for (BlurResult result : results.getResults()) {
+&nbsp;&nbsp;System.out.println(result);
+}
+</code></pre>
+
+
+
 <h3 id="simple_faceting_example">Faceting Example</h3>
 <p>
 This is an example of how to use the faceting feature in a query.  This API will likely be
update in a future version.

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5acb8252/docs/using-blur.html
----------------------------------------------------------------------
diff --git a/docs/using-blur.html b/docs/using-blur.html
index 12a92ec..830c4bf 100644
--- a/docs/using-blur.html
+++ b/docs/using-blur.html
@@ -63,6 +63,7 @@
 	            </li>
                 <li><a href="#simple_query_example">Query Example</a></li>
                 <li><a href="#simple_query_example_data">Query Example with Data</a></li>
+                <li><a href="#simple_query_sorting">Query Example with Sorting</a></li>
                 <li><a href="#simple_faceting_example">Faceting Example</a></li>
                 <li><a href="#simple_fetch_data">Fetch Data</a></li>
                 <li><a href="#simple_mutate_example">Mutate Example</a></li>
@@ -253,6 +254,38 @@ for (BlurResult result : results.getResults()) {
 }
 </code></pre>
 
+
+
+<h3 id="simple_query_sorting">Query Example with Sorting</h3>
+<p>
+This is an example of how to run a query via the Thrift API and get back search results with
+ data being sorted by the &quot;docs.timestamp&quot; column. All the columns in the
records 
+will be returned.
+<div class="bs-callout bs-callout-info"><h4>Note</h4>Sorting is only allowed
on Record queries at this point.</div>
+</p>
+<pre><code class="java">Iface client = BlurClient.getClient("controller1:40010,controller2:40010");
+
+Query query = new Query();
+query.setQuery(&quot;+docs.body:\&quot;Hadoop is awesome\&quot;&quot;);
+query.setRowQuery(false);
+
+Selector selector = new Selector();
+selector.setRecordOnly(true);
+
+BlurQuery blurQuery = new BlurQuery();
+blurQuery.setQuery(query);
+blurQuery.setSelector(selector);
+blurQuery.addToSortFields(new SortField(&quot;docs&quot;, &quot;timestamp&quot;,
true));
+
+BlurResults results = client.query(&quot;table1&quot;, blurQuery);
+System.out.println(&quot;Total Results: &quot; + results.totalResults);
+for (BlurResult result : results.getResults()) {
+&nbsp;&nbsp;System.out.println(result);
+}
+</code></pre>
+
+
+
 <h3 id="simple_faceting_example">Faceting Example</h3>
 <p>
 This is an example of how to use the faceting feature in a query.  This API will likely be
update in a future version.
@@ -397,7 +430,7 @@ The following rules are used when interacting with the shell:
 <pre><code class="bash">list </code></pre></p>
 <h4 id="shell_command_schema">schema</h4>
 <p>Description: Schema of the named table.<br/>
-<pre><code class="bash">schema &lt;tablename&gt;</code></pre></p>
+<pre><code class="bash">schema &lt;tablename&gt; [&lt;family&gt;
...]</code></pre></p>
 <h4 id="shell_command_stats">stats</h4>
 <p>Description: Print stats for the named table.<br/>
 <pre><code class="bash">stats &lt;tablename&gt;</code></pre></p>
@@ -408,8 +441,8 @@ The following rules are used when interacting with the shell:
 <p>Description: Parse a query and return string representation.<br/>
 <pre><code class="bash">parse &lt;tablename&gt; &lt;query&gt;</code></pre></p>
 <h4 id="shell_command_definecolumn">definecolumn</h4>
-<p>Description: Defines a new column in the named table.<br/>
-<pre><code class="bash">definecolumn &lt;table name&gt; &lt;family&gt;
&lt;column name&gt; &lt;type&gt; [-s &lt;sub column name&gt;] [-F]
[-p name value]*</code></pre></p>
+<p>Description: Defines a new column in the named table. '-F' option is for fieldless
searching and the '-S' is for sortability.<br/>
+<pre><code class="bash">definecolumn &lt;table name&gt; &lt;family&gt;
&lt;column name&gt; &lt;type&gt; [-s &lt;sub column name&gt;] [-F]
[-S] [-p name value]*</code></pre></p>
 <h3 id="shell_data_commands">Data Commands</h3>
 <h4 id="shell_command_query">query</h4>
 <p>Description: Query the named table.<br/>


Mime
View raw message