You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jb...@apache.org on 2019/06/16 18:35:51 UTC

[lucene-solr] branch SOLR-13105-visual updated: SOLR-13105: Add initial search docs

This is an automated email from the ASF dual-hosted git repository.

jbernste pushed a commit to branch SOLR-13105-visual
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/SOLR-13105-visual by this push:
     new 6928091  SOLR-13105: Add initial search docs
6928091 is described below

commit 69280914a3de60b01e3495ce2e63965dfd73c360
Author: Joel Bernstein <jb...@apache.org>
AuthorDate: Sun Jun 16 14:35:32 2019 -0400

    SOLR-13105: Add initial search docs
---
 .../images/math-expressions/search-sort-plot.png   | Bin 0 -> 278066 bytes
 .../src/images/math-expressions/search-sort.png    | Bin 0 -> 248445 bytes
 .../src/images/math-expressions/search1.png        | Bin 0 -> 148296 bytes
 solr/solr-ref-guide/src/math-expressions.adoc      |   2 +-
 solr/solr-ref-guide/src/search-sample.adoc         |  75 ++++++++++++++++++++-
 5 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/solr/solr-ref-guide/src/images/math-expressions/search-sort-plot.png b/solr/solr-ref-guide/src/images/math-expressions/search-sort-plot.png
new file mode 100644
index 0000000..6a02113
Binary files /dev/null and b/solr/solr-ref-guide/src/images/math-expressions/search-sort-plot.png differ
diff --git a/solr/solr-ref-guide/src/images/math-expressions/search-sort.png b/solr/solr-ref-guide/src/images/math-expressions/search-sort.png
new file mode 100644
index 0000000..66f1dd2
Binary files /dev/null and b/solr/solr-ref-guide/src/images/math-expressions/search-sort.png differ
diff --git a/solr/solr-ref-guide/src/images/math-expressions/search1.png b/solr/solr-ref-guide/src/images/math-expressions/search1.png
new file mode 100644
index 0000000..0742481
Binary files /dev/null and b/solr/solr-ref-guide/src/images/math-expressions/search1.png differ
diff --git a/solr/solr-ref-guide/src/math-expressions.adoc b/solr/solr-ref-guide/src/math-expressions.adoc
index 41b8187..79d32a5 100644
--- a/solr/solr-ref-guide/src/math-expressions.adoc
+++ b/solr/solr-ref-guide/src/math-expressions.adoc
@@ -41,7 +41,7 @@ image::images/math-expressions/curve-fitting.png[]
 
 *<<term-vectors.adoc#term-vectors,Text Analysis and Term Vectors>>*: Text analysis and TF-IDF term vectors.
 
-*<<statistics.adoc#statistics,Statistics>>*: Descriptive statistics, histograms, percentiles, correlation and other statistical functions.
+*<<statistics.adoc#statistics,Statistics>>*: Descriptive statistics, histograms, percentiles, correlation, inference tests and other stats functions.
 
 *<<probability-distributions.adoc#probability-distributions,Probability>>*: Real, discrete and empirical probability distributions.
 
diff --git a/solr/solr-ref-guide/src/search-sample.adoc b/solr/solr-ref-guide/src/search-sample.adoc
index e341557..6695b14 100644
--- a/solr/solr-ref-guide/src/search-sample.adoc
+++ b/solr/solr-ref-guide/src/search-sample.adoc
@@ -23,11 +23,84 @@ numeric fields.
 See the section <<term-vectors.adoc#term-vectors,Text Analysis and Term Vectors>> which describes how to
 vectorize text fields.
 
-== Searching
+== Searching and Sorting
+
+The *search* function can be used to search a Solr Cloud collection and return a
+result set.
+
+Below is an example of the most basic *search* function called from the Zeppelin-Solr interpreter.
+Zeppelin-Solr sends the *seach(testapp)* call to the /stream handler and displays the results
+in *table* format.
+
+This simple example is instructive for how Zeppelin-Solr handles all Streaming Expressions,
+which by definition return a stream of tuples or name/value pair documents. Zeppelin-Solr creates a
+table from the result set with one row per tuple. Each column of the table represents a field in the tuples.
+
+Once the tuples have been loaded into a table the columns in the table can be visualized by switching
+to the various visualizations and configuring the settings.
+
+In the example the search function passed only the name of the collection being search. This returns
+a result set of 10 records showing all fields in and unspecified order. This simple function is useful
+for exploring the fields in the data and understanding how to start refining the search criteria.
+
+image::images/math-expressions/search1.png[]
+
+Once we see the format of the records we can add parameters to the *search* function to begin analyzing
+the data.
+
+In the example below a search query (q), field list (fl), rows and sort have been added to the search
+function. Now we are searching for records which contain weather in the abstract_t field and returning
+a result set of 500 sorted by a timestamp descending. We have also limited the result set to only three
+fields.
+
+image::images/math-expressions/search-sort.png[]
+
+
+Once we have a the data loaded into the table we can switch to a scatter plot of the filesize_d column
+on the *x axis* and the response_d column on the *y axis*.
+
+image::images/math-expressions/search-sort-plot.png[]
+
+This allows us to quickly visualize the relationship between two variables
+select from the a very specific slice of the index. In this example it's the
+500 most recent documents by timestamp, that match the term *weather*.
+
+=== Scoring
 
 
 == Sampling
 
+[source,text]
+----
+random(testapp)
+----
+
+When this expression is sent to the `/stream` handler it responds with:
 
+[source,json]
+----
+{
+  "result-set": {
+    "docs": [
+      {
+        "response_d": 1080.3692514541938,
+        "new_response": 10803.692514541937
+      },
+      {
+        "response_d": 1067.441598608506,
+        "new_response": 10674.41598608506
+      },
+      {
+        "response_d": 1059.8400090891566,
+        "new_response": 10598.400090891566
+      },
+      {
+        "EOF": true,
+        "RESPONSE_TIME": 12
+      }
+    ]
+  }
+}
+----
 == Aggregations