geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [geode] 01/01: GEODE-3722: Fixing typo in lucene query command
Date Thu, 28 Sep 2017 22:55:22 GMT
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/GEODE-3722
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 09ca8bac5ee0dfe3790b42348a166ed75712e841
Author: Dan Smith <upthewaterspout@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;">&#8209;&#8208;queryStrings</span></td>
+<td><span class="keyword parmname" style="whitespace:nowrap;">&#8209;&#8208;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" <commits@geode.apache.org>.

Mime
View raw message