You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Diane Hardman (JIRA)" <ji...@apache.org> on 2017/12/28 18:51:00 UTC

[jira] [Commented] (GEODE-4155) Lucene search in gfsh fails for integer values

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

Diane Hardman commented on GEODE-4155:
--------------------------------------

The Lucene StandardQueryParser is used as the default query provider for gfsh 'search lucene' commands. This query parser does not handle searching numeric values unless they are specified as type string.
Customers may implement a different query parser, using IntegerRangeQuery or TermQuery options from Lucene, but we currently do not provide an option in the gfsh 'search lucene' command to specify an alternate query provider.
This request is to add an option such as '--queryprovider=<classpathToAltQueryProvider>'. This assumes that the alternate query provider specified would be used for all fields specified in the query string.

> Lucene search in gfsh fails for integer values
> ----------------------------------------------
>
>                 Key: GEODE-4155
>                 URL: https://issues.apache.org/jira/browse/GEODE-4155
>             Project: Geode
>          Issue Type: Improvement
>          Components: gfsh, lucene
>            Reporter: Diane Hardman
>             Fix For: 1.3.0
>
>
> Using the geode-example/lucene, follow the README file to build the example, start up the cluster, and load the Employee data.
> In gfsh, I can successfully use OQL to query for entries with salary=75000, but a Lucene query for the same salary returns no results:
> OQL Query:
> {code}
> gfsh>query --query="select * from /example-region where salary=75000"
> Result : true
> Limit  : 100
> Rows   : 2
>      contacts      |         email         | emplNumber | firstName | hoursPerWeek | lastName | salary | startDate
> ------------------ | --------------------- | ---------- | --------- | ------------ | -------- | ------ | -------------
> org.json.JSONArray | Kris.Call@example.com | 10003      | Kris      | 40           | Call     | 75000  | 1502397254080
> org.json.JSONArray | Pat.Puts@example.com  | 10028      | Pat       | 40           | Puts     | 75000  | 1502397254080
> {code}
> Lucene Query:
> {code}
> gfsh>search lucene --name=simpleIndex --region=example-region --queryStrings="salary:75000" --defaultField=salary
> No results
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)