[jira] [Commented] (GEODE-2952) gfsh doesn't support exact match lucene queries

2017-05-31 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16031524#comment-16031524
 ] 

ASF subversion and git services commented on GEODE-2952:


Commit c08d70dd4695dbbad17f86fa4227a13497ab0b08 in geode's branch 
refs/heads/feature/GEODE-1279 from [~karensmolermiller]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=c08d70d ]

GEODE-2952 document quoting of exact match Lucene queries

This closes #545


> gfsh doesn't support exact match lucene queries
> ---
>
> Key: GEODE-2952
> URL: https://issues.apache.org/jira/browse/GEODE-2952
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: Barry Oglesby
>Assignee: David Anuta
> Fix For: 1.2.0
>
>
> This command:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='Police Dept'
> {noformat}
> Runs this lucene query:
> {noformat}
> Resolution_Description:police Resolution_Description:dept
> {noformat}
> I also tried this command which ran the same lucene query as above:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='\"Police Dept\"'
> {noformat}
> The java API supports exact match queries with "" around the queryString. 
> Doing this causes this lucene query to be run:
> {noformat}
> Resolution_Description:"police dept"
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2952) gfsh doesn't support exact match lucene queries

2017-05-30 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16030110#comment-16030110
 ] 

ASF subversion and git services commented on GEODE-2952:


Commit c08d70dd4695dbbad17f86fa4227a13497ab0b08 in geode's branch 
refs/heads/develop from [~karensmolermiller]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=c08d70d ]

GEODE-2952 document quoting of exact match Lucene queries

This closes #545


> gfsh doesn't support exact match lucene queries
> ---
>
> Key: GEODE-2952
> URL: https://issues.apache.org/jira/browse/GEODE-2952
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: Barry Oglesby
>Assignee: David Anuta
> Fix For: 1.2.0
>
>
> This command:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='Police Dept'
> {noformat}
> Runs this lucene query:
> {noformat}
> Resolution_Description:police Resolution_Description:dept
> {noformat}
> I also tried this command which ran the same lucene query as above:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='\"Police Dept\"'
> {noformat}
> The java API supports exact match queries with "" around the queryString. 
> Doing this causes this lucene query to be run:
> {noformat}
> Resolution_Description:"police dept"
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2952) gfsh doesn't support exact match lucene queries

2017-05-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16030111#comment-16030111
 ] 

ASF GitHub Bot commented on GEODE-2952:
---

Github user asfgit closed the pull request at:

https://github.com/apache/geode/pull/545


> gfsh doesn't support exact match lucene queries
> ---
>
> Key: GEODE-2952
> URL: https://issues.apache.org/jira/browse/GEODE-2952
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: Barry Oglesby
>Assignee: David Anuta
> Fix For: 1.2.0
>
>
> This command:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='Police Dept'
> {noformat}
> Runs this lucene query:
> {noformat}
> Resolution_Description:police Resolution_Description:dept
> {noformat}
> I also tried this command which ran the same lucene query as above:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='\"Police Dept\"'
> {noformat}
> The java API supports exact match queries with "" around the queryString. 
> Doing this causes this lucene query to be run:
> {noformat}
> Resolution_Description:"police dept"
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2952) gfsh doesn't support exact match lucene queries

2017-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16027005#comment-16027005
 ] 

ASF GitHub Bot commented on GEODE-2952:
---

Github user dihardman commented on the issue:

https://github.com/apache/geode/pull/545
  
+1 Looks good!

On Fri, May 26, 2017 at 3:15 PM, Karen Miller 
wrote:

> @DivineEnder  @upthewaterspout
>  @boglesby
>  @nabarunnag 
> @ladyVader  @dihardman
> 
> Please review.
> --
> You can view, comment on, or merge this pull request online at:
>
>   https://github.com/apache/geode/pull/545
> Commit Summary
>
>- GEODE-2952 document quoting of exact match Lucene queries
>
> File Changes
>
>- *M* geode-docs/tools_modules/gfsh/command-pages/search.html.md.erb
> (15)
>
> Patch Links:
>
>- https://github.com/apache/geode/pull/545.patch
>- https://github.com/apache/geode/pull/545.diff
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> , or mute the thread
> 

> .
>



> gfsh doesn't support exact match lucene queries
> ---
>
> Key: GEODE-2952
> URL: https://issues.apache.org/jira/browse/GEODE-2952
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: Barry Oglesby
>Assignee: David Anuta
> Fix For: 1.2.0
>
>
> This command:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='Police Dept'
> {noformat}
> Runs this lucene query:
> {noformat}
> Resolution_Description:police Resolution_Description:dept
> {noformat}
> I also tried this command which ran the same lucene query as above:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='\"Police Dept\"'
> {noformat}
> The java API supports exact match queries with "" around the queryString. 
> Doing this causes this lucene query to be run:
> {noformat}
> Resolution_Description:"police dept"
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2952) gfsh doesn't support exact match lucene queries

2017-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026941#comment-16026941
 ] 

ASF GitHub Bot commented on GEODE-2952:
---

GitHub user karensmolermiller opened a pull request:

https://github.com/apache/geode/pull/545

GEODE-2952 document quoting of exact match Lucene queries

@DivineEnder @upthewaterspout @boglesby @nabarunnag @ladyVader @dihardman
Please review.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/karensmolermiller/geode feature/GEODE-2952

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/geode/pull/545.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #545


commit 71f01758e1fa7535fc19dffb542293b8eddbac31
Author: Karen Miller 
Date:   2017-05-26T22:10:43Z

GEODE-2952 document quoting of exact match Lucene queries




> gfsh doesn't support exact match lucene queries
> ---
>
> Key: GEODE-2952
> URL: https://issues.apache.org/jira/browse/GEODE-2952
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: Barry Oglesby
>Assignee: David Anuta
> Fix For: 1.2.0
>
>
> This command:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='Police Dept'
> {noformat}
> Runs this lucene query:
> {noformat}
> Resolution_Description:police Resolution_Description:dept
> {noformat}
> I also tried this command which ran the same lucene query as above:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='\"Police Dept\"'
> {noformat}
> The java API supports exact match queries with "" around the queryString. 
> Doing this causes this lucene query to be run:
> {noformat}
> Resolution_Description:"police dept"
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2952) gfsh doesn't support exact match lucene queries

2017-05-25 Thread David Anuta (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16025244#comment-16025244
 ] 

David Anuta commented on GEODE-2952:


Turns out you can do exact query matches using double quotes, but it is 
dependent upon the quotes used when actually passing the query string to the 
GFSH shell. Below is an example exact query matching on the string "police 
dept" within a test index which contains both the exact string "police dept" 
and the string "police".

{noformat}
describe lucene index --name index --region region

Index Name | Region Path | Server Name | Indexed Fields | 
Field Analyzer  |   Status| Query Executions | Updates | 
Commits | Documents

-- | --- | --- | -- | 
--- | --- |  | 
--- | --- | -

index  | /region | s1  | [__REGION_VALUE_FIELD] | 
{__REGION_VALUE_FIELD=StandardAnalyzer} | Initialized | 0| 0
   | 0   | 0

gfsh>put --region region --key 1 --value="police dept"

Result  : true

Key Class   : java.lang.String

Key : 1

Value Class : java.lang.String

Old Value   : 





gfsh>put --region region --key 2 --value="police"

Result  : true

Key Class   : java.lang.String

Key : 2

Value Class : java.lang.String

Old Value   : 



gfsh>search lucene --name index --region region --queryStrings='"police dept"' 
--defaultField __REGION_VALUE_FIELD

key |value| score

--- | --- | --

1   | police dept | 0.51623213



gfsh>search lucene --name index --region region --queryStrings='police dept' 
--defaultField __REGION_VALUE_FIELD

key |value| score

--- | --- | --

2   | police  | 0.2876821

1   | police dept | 0.51623213



gfsh>put --region region --key 3 --value="ABC"

Result  : true

Key Class   : java.lang.String

Key : 3

Value Class : java.lang.String

Old Value   : 





gfsh>search lucene --name index --region region 
--queryStrings='__REGION_VALUE_FIELD:"police dept"' --defaultField 
__REGION_VALUE_FIELD

key |value| score

--- | --- | --

1   | police dept | 0.51623213



gfsh>search lucene --name index --region region 
--queryStrings='__REGION_VALUE_FIELD:"police dept" OR 
__REGION_VALUE_FIELD:"ABC"' --defaultField __REGION_VALUE_FIELD

key |value| score

--- | --- | --

3   | ABC | 0.2876821

1   | police dept | 0.51623213



gfsh>search lucene --name index --region region 
--queryStrings='__REGION_VALUE_FIELD:"police dept" OR 
__REGION_VALUE_FIELD:\'ABC\'' --defaultField __REGION_VALUE_FIELD

key |value| score

--- | --- | --

3   | ABC | 0.2876821

1   | police dept | 0.51623213



gfsh>search lucene --name index --region region 
--queryStrings="__REGION_VALUE_FIELD:'police dept' OR 
__REGION_VALUE_FIELD:'ABC'" --defaultField __REGION_VALUE_FIELD

key |value| score

--- | --- | --

2   | police  | 0.2876821

3   | ABC | 0.2876821

1   | police dept | 0.51623213



gfsh>search lucene --name index --region region 
--queryStrings="__REGION_VALUE_FIELD:\"police dept\" OR 
__REGION_VALUE_FIELD:'ABC'" --defaultField __REGION_VALUE_FIELD

key |value| score

--- | --- | --

3   | ABC | 0.2876821

1   | police dept | 0.51623213

{noformat}

As you can see, the double quotations must be used within the actual query 
string parameter passed to the queryStrings flag in order to get a proper exact 
match on the query string through the API. In the example given in the 
description of this issue, the 'Police Dept' case failed to exact match because 
there were no double quotes around the Police Dept string and the '\"Police 
Dept\"' string failed because the double quotes were escaped when they did not 
need to be. The formatting for exact string matching on the string Police Dept 
right now must be either '"Police Dept"' (no escape characters are needed for 
parsing) or "\"Police Dept\"" (escape characters needed for flag parsing).

> gfsh doesn't support exact match lucene queries
> ---
>
> Key: GEODE-2952
> URL: https://issues.apache.org/jira/browse/GEODE-2952
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: Barry Oglesby
>Assignee: David Anuta
> Fix For: 1.2.0
>
>
> This command:
> {noformat}
> gfsh>search lucene --name=index --region=data 
> --defaultField=Resolution_Description --queryStrings='Police Dept'
> {noformat}
> Runs this lucene query:
> {noformat}
> Resolution_Description:police Resolution_Description:dept
> {noformat}
> I also tried this command which ran the same lucene