You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by up...@apache.org on 2017/09/29 16:37:06 UTC
[geode] branch develop updated: GEODE-3722: Fixing typo in lucene
query command
This is an automated email from the ASF dual-hosted git repository.
upthewaterspout pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 03fa46a GEODE-3722: Fixing typo in lucene query command
03fa46a is described below
commit 03fa46a6181e0fb21cb5ef6039843d75ebcc3faa
Author: Dan Smith <up...@apache.org>
AuthorDate: Fri Aug 4 15:41:37 2017 -0700
GEODE-3722: Fixing typo in lucene query command
Supporting both --queryStrings and --queryString in the command.
Updating the docs to use --queryString, which is the grammatically
correct option.
---
.../tools_modules/gfsh/command-pages/search.html.md.erb | 12 ++++++------
.../geode/cache/lucene/internal/cli/LuceneCliStrings.java | 3 ++-
.../geode/cache/lucene/internal/cli/LuceneIndexCommands.java | 5 ++++-
3 files changed, 12 insertions(+), 8 deletions(-)
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 085f3a3..f88d942 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
@@ -30,7 +30,7 @@ See also [create lucene index](create.html#create_lucene_index), [describe lucen
**Syntax:**
``` pre
-search lucene --name=value --region=value --queryStrings=value --defaultField=value
+search lucene --name=value --region=value --queryString=value --defaultField=value
[--limit=value] [--keys-only=value]
```
@@ -61,7 +61,7 @@ search lucene --name=value --region=value --queryStrings=value --defaultField=va
<td> </td>
</tr>
<tr>
-<td><span class="keyword parmname" style="whitespace:nowrap;">‑‐queryStrings</span></td>
+<td><span class="keyword parmname" style="whitespace:nowrap;">‑‐queryString</span></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>
@@ -84,19 +84,19 @@ search lucene --name=value --region=value --queryStrings=value --defaultField=va
**Example Commands:**
``` pre
-gfsh> search lucene --name=testIndex --region=/testRegion --queryStrings=value1
+gfsh> search lucene --name=testIndex --region=/testRegion --queryString=value1
--defaultField=__REGION_VALUE_FIELD
gfsh> search lucene --name=indexOfStrings --region=/stringTestRegion
- --queryStrings='__REGION_VALUE_FIELD:"my exact string"'
+ --queryString='__REGION_VALUE_FIELD:"my exact string"'
--defaultField=__REGION_VALUE_FIELD
```
**Sample Output:**
``` pre
-gfsh>search lucene --name=testIndex --region=/testRegion --queryStrings=value*
+gfsh>search lucene --name=testIndex --region=/testRegion --queryString=value*
--defaultField=__REGION_VALUE_FIELD
key | value | score
--- | ------ | -----
@@ -107,7 +107,7 @@ key | value | score
``` pre
gfsh>search lucene --region=/Person --name=analyzerIndex
- --defaultField=addr --queryStrings="97763"
+ --defaultField=addr --queryString="97763"
key | value | score
------ | ------------------------------------------------------------------ | --------
key763 | Person{name='Kris Cat', addr='7 Ash St, Portland_OR_97763', emai.. | 1.669657
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneCliStrings.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneCliStrings.java
index 8104b3f..c4c10df 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneCliStrings.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneCliStrings.java
@@ -75,7 +75,8 @@ public class LuceneCliStrings {
"Name of the lucene index to search.";
public static final String LUCENE_SEARCH_INDEX__REGION_HELP =
"Name/Path of the region defining the lucene index to be searched.";
- public static final String LUCENE_SEARCH_INDEX__QUERY_STRING = "queryStrings";
+ public static final String LUCENE_SEARCH_INDEX__QUERY_STRING = "queryString";
+ public static final String LUCENE_SEARCH_INDEX__QUERY_STRINGS = "queryStrings";
public static final String LUCENE_SEARCH_INDEX__LIMIT = "limit";
public static final String LUCENE_SEARCH_INDEX__LIMIT__HELP = "Number of search results needed";
public static final String LUCENE_SEARCH_INDEX__QUERY_STRING__HELP =
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
index 090cd0f..ba296a8 100755
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
@@ -285,7 +285,10 @@ public class LuceneIndexCommands implements GfshCommand {
optionContext = ConverterHint.REGION_PATH,
help = LuceneCliStrings.LUCENE_SEARCH_INDEX__REGION_HELP) final String regionPath,
- @CliOption(key = LuceneCliStrings.LUCENE_SEARCH_INDEX__QUERY_STRING, mandatory = true,
+ @CliOption(
+ key = {LuceneCliStrings.LUCENE_SEARCH_INDEX__QUERY_STRING,
+ LuceneCliStrings.LUCENE_SEARCH_INDEX__QUERY_STRINGS},
+ mandatory = true,
help = LuceneCliStrings.LUCENE_SEARCH_INDEX__QUERY_STRING__HELP) final String queryString,
@CliOption(key = LuceneCliStrings.LUCENE_SEARCH_INDEX__DEFAULT_FIELD, mandatory = true,
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].