geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barry Oglesby (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GEODE-2950) Lucene index names should be restricted to valid region names since the index name becomes part of a region
Date Fri, 19 May 2017 16:59:04 GMT
Barry Oglesby created GEODE-2950:
------------------------------------

             Summary: Lucene index names should be restricted to valid region names since
the index name becomes part of a region
                 Key: GEODE-2950
                 URL: https://issues.apache.org/jira/browse/GEODE-2950
             Project: Geode
          Issue Type: Bug
          Components: lucene
            Reporter: Barry Oglesby


Currently, invalid region name characters can be used as index names. The index name becomes
part of the async event queue id which becomes part of the colocated region name, so invalid
characters shouldn't be allowed as index names. LocalRegion has a validateRegionName method
that restricts the names to {{\[aA-zZ0-9-_.\]+}}. This method should be called to validate
index names.

Here is an example (option-j creates the ∆):
{noformat}
gfsh>create lucene index --name=∆∆∆ --region=data --field=text
              Member                | Status
----------------------------------- | ---------------------------------
192.168.2.4(server2:53308)<v1>:1025 | Successfully created lucene index
192.168.2.4(server1:53315)<v2>:1026 | Successfully created lucene index
{noformat}
{noformat}
gfsh>create region --name=data --type=PARTITION
Member  | Status
------- | -----------------------------------
server2 | Region "/data" created on "server2"
server1 | Region "/data" created on "server1"
{noformat}
{noformat}
gfsh>put --key=0 --value=0 --region=data
Result      : true
Key Class   : java.lang.String
Key         : 0
Value Class : java.lang.String
Old Value   : <NULL>
{noformat}
{noformat}
gfsh>describe lucene index --name=∆∆∆ --region=/data
Index Name | Region Path | Server Name | Indexed Fields |     Field Analyzer      |   Status
   | Query Executions | Updates | Commits | Documents
---------- | ----------- | ----------- | -------------- | ----------------------- | -----------
| ---------------- | ------- | ------- | ---------
∆∆∆        | /data       | server1     | [text]         | {text=StandardAnalyzer} |
Initialized | 0                | 0       | 0       | 0
∆∆∆        | /data       | server2     | [text]         | {text=StandardAnalyzer} |
Initialized | 0                | 1       | 1       | 1
{noformat}



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

Mime
View raw message