Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EEA0A200D1F for ; Fri, 29 Sep 2017 00:55:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ECE141609CD; Thu, 28 Sep 2017 22:55:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 182C61609EC for ; Fri, 29 Sep 2017 00:55:24 +0200 (CEST) Received: (qmail 84269 invoked by uid 500); 28 Sep 2017 22:55:24 -0000 Mailing-List: contact commits-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list commits@geode.apache.org Received: (qmail 84260 invoked by uid 99); 28 Sep 2017 22:55:24 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Sep 2017 22:55:24 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8DCA7819C8; Thu, 28 Sep 2017 22:55:21 +0000 (UTC) Date: Thu, 28 Sep 2017 22:55:22 +0000 To: "commits@geode.apache.org" Subject: [geode] 01/01: GEODE-3722: Fixing typo in lucene query command MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: upthewaterspout@apache.org In-Reply-To: <150663932155.19327.15075862837018188026@gitbox.apache.org> References: <150663932155.19327.15075862837018188026@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: geode X-Git-Refname: refs/heads/feature/GEODE-3722 X-Git-Reftype: branch X-Git-Rev: 09ca8bac5ee0dfe3790b42348a166ed75712e841 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20170928225522.8DCA7819C8@gitbox.apache.org> archived-at: Thu, 28 Sep 2017 22:55:26 -0000 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 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 -‑‐queryStrings +‑‐queryString Required. Query string to search the Lucene index. Use __REGION_VALUE_FIELD 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. @@ -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" .