You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2017/05/31 23:15:12 UTC
[13/35] geode git commit: GEODE-3002 Clarify __REGION_VALUE_FIELD in
Lucene docs
GEODE-3002 Clarify __REGION_VALUE_FIELD in Lucene docs
This closes #550
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/64e4f727
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/64e4f727
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/64e4f727
Branch: refs/heads/feature/GEODE-2632-19
Commit: 64e4f72774e1ee811ea7f920fcb9a9598191bd4a
Parents: 5f4a797
Author: Karen Miller <km...@pivotal.io>
Authored: Tue May 30 13:39:00 2017 -0700
Committer: Karen Miller <km...@pivotal.io>
Committed: Wed May 31 10:48:49 2017 -0700
----------------------------------------------------------------------
.../gfsh/command-pages/create.html.md.erb | 15 +++++------
.../gfsh/command-pages/search.html.md.erb | 26 ++++++++++----------
.../lucene_integration.html.md.erb | 10 +++++---
3 files changed, 27 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/64e4f727/geode-docs/tools_modules/gfsh/command-pages/create.html.md.erb
----------------------------------------------------------------------
diff --git a/geode-docs/tools_modules/gfsh/command-pages/create.html.md.erb b/geode-docs/tools_modules/gfsh/command-pages/create.html.md.erb
index ef68f90..1f63ead 100644
--- a/geode-docs/tools_modules/gfsh/command-pages/create.html.md.erb
+++ b/geode-docs/tools_modules/gfsh/command-pages/create.html.md.erb
@@ -674,7 +674,8 @@ See also [describe lucene index](describe.html#describe_lucene_index), [destroy
**Syntax:**
``` pre
-create lucene index --name=value --region=value --field=value(,value)* [--analyzer=value(,value)*] [--group=value(,value)*]
+create lucene index --name=value --region=value --field=value(,value)*
+ [--analyzer=value(,value)*] [--group=value(,value)*]
```
**Parameters, create lucene index:**
@@ -691,20 +692,20 @@ create lucene index --name=value --region=value --field=value(,value)* [--analyz
**Example Commands:**
``` pre
-gfsh>create region --name=Person --type=PARTITION_REDUNDANT_PERSISTENT
-
-gfsh>create lucene index --name=customerIndex --region=/Customer
- --field=symbol,revenue,SSN,name,email,address,__REGION_VALUE_FIELD
+create lucene index --name=customerIndex --region=/Customer
+ --field=__REGION_VALUE_FIELD
gfsh>create lucene index --name=analyzerIndex --region=/Person
--field=name,email,address,revenue
- --analyzer=DEFAULT,org.apache.lucene.analysis.core.KeywordAnalyzer,examples.MyCharacterAnalyzer,DEFAULT
+ --analyzer=DEFAULT,org.apache.lucene.analysis.core.KeywordAnalyzer,
+ examples.MyCharacterAnalyzer,DEFAULT
```
**Sample Output:**
``` pre
-gfsh>create lucene index --name=testIndex --region=testRegion --field=__REGION_VALUE_FIELD
+gfsh>create lucene index --name=testIndex --region=testRegion
+ --field=__REGION_VALUE_FIELD
Member | Status
-------------------------------------- | ---------------------------------
192.168.1.23(server505:17200)<v1>:1025 | Successfully created lucene index
http://git-wip-us.apache.org/repos/asf/geode/blob/64e4f727/geode-docs/tools_modules/gfsh/command-pages/search.html.md.erb
----------------------------------------------------------------------
diff --git a/geode-docs/tools_modules/gfsh/command-pages/search.html.md.erb b/geode-docs/tools_modules/gfsh/command-pages/search.html.md.erb
index 1c63ecf..085f3a3 100644
--- a/geode-docs/tools_modules/gfsh/command-pages/search.html.md.erb
+++ b/geode-docs/tools_modules/gfsh/command-pages/search.html.md.erb
@@ -52,22 +52,22 @@ search lucene --name=value --region=value --queryStrings=value --defaultField=va
<tbody>
<tr>
<td><span class="keyword parmname">\-\-name</span></td>
-<td><em>Required</em>. Name of the lucene index to search.</td>
+<td><em>Required</em>. Name of the Lucene index to search.</td>
<td> </td>
</tr>
<tr>
<td><span class="keyword parmname">\-\-region</span></td>
-<td><em>Required</em>. Name/Path of the region where the lucene index exists.</td>
+<td><em>Required</em>. Name/Path of the region where the Lucene index exists.</td>
<td> </td>
</tr>
<tr>
<td><span class="keyword parmname" style="whitespace:nowrap;">‑‐queryStrings</span></td>
-<td><em>Required</em>. Query string to search the lucene index. Surround a string with double quote marks to do an exact match of the string.</td>
+<td><em>Required</em>. Query string to search the Lucene index. Use <code>__REGION_VALUE_FIELD</code> as the field name within the query string when the field is a primitive value. Surround a string with double quote marks to do an exact match of the string.</td>
<td> </td>
</tr>
<tr>
<td><span class="keyword parmname" style="whitespace:nowrap;">‑‐defaultField</span></td>
-<td><em>Required</em>. Default field to search in.</td>
+<td><em>Required</em>. Default field to search in. <code>__REGION_VALUE_FIELD</code> identifies the field as a primitive value.</td>
<td> </td>
</tr>
<tr>
@@ -85,7 +85,7 @@ search lucene --name=value --region=value --queryStrings=value --defaultField=va
``` pre
gfsh> search lucene --name=testIndex --region=/testRegion --queryStrings=value1
- --defaultField=__REGION_VALUE_FIELD
+ --defaultField=__REGION_VALUE_FIELD
gfsh> search lucene --name=indexOfStrings --region=/stringTestRegion
@@ -97,20 +97,20 @@ gfsh> search lucene --name=indexOfStrings --region=/stringTestRegion
``` pre
gfsh>search lucene --name=testIndex --region=/testRegion --queryStrings=value*
- --defaultField=__REGION_VALUE_FIELD
+ --defaultField=__REGION_VALUE_FIELD
key | value | score
--- | ------ | -----
3 | value3 | 1
2 | value2 | 1
1 | value1 | 1
+```
-gfsh>search lucene --region=/Person --name=analyzerIndex --defaultField=address
- --queryStrings="97763"
- key | value | score
------- | --------------------------------------------------------------------------------------------------------- | ---------
-key763 | Person{name='Fred Freeloader', email='ffl@example.com', address='763 Miles Dv, Portland_OR_97763', re.. | 1.6694657
-
-
+``` pre
+gfsh>search lucene --region=/Person --name=analyzerIndex
+ --defaultField=addr --queryStrings="97763"
+ key | value | score
+------ | ------------------------------------------------------------------ | --------
+key763 | Person{name='Kris Cat', addr='7 Ash St, Portland_OR_97763', emai.. | 1.669657
```
http://git-wip-us.apache.org/repos/asf/geode/blob/64e4f727/geode-docs/tools_modules/lucene_integration.html.md.erb
----------------------------------------------------------------------
diff --git a/geode-docs/tools_modules/lucene_integration.html.md.erb b/geode-docs/tools_modules/lucene_integration.html.md.erb
index 41d429b..457fff7 100644
--- a/geode-docs/tools_modules/lucene_integration.html.md.erb
+++ b/geode-docs/tools_modules/lucene_integration.html.md.erb
@@ -94,10 +94,12 @@ gfsh>create lucene index --name=indexName --region=/orders --field=customer,tags
gfsh>create lucene index --name=indexName --region=/orders
--field=customer,tags --analyzer=DEFAULT,org.apache.lucene.analysis.bg.BulgarianAnalyzer
```
-To use the entire value as a single field set the required `--field`
-option to be `__REGION_VALUE_FIELD`.
-This is only supported when the region entry value is a `String`, `Long`,
-`Integer`, `Float`, or `Double`.
+The value `__REGION_VALUE_FIELD` identifies when the
+field is a single primitive type.
+Use it to define the `--field` option,
+as there will be no field name to use in the case of a primitive type.
+`__REGION_VALUE_FIELD` supports entry values of type `String`, `Long`,
+`Integer`, `Float`, and `Double`.
### <a id="xml-configuration" class="no-quick-link"></a>XML Configuration to Create an Index