[
https://issues.apache.org/jira/browse/GEODE-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15764893#comment-15764893
]
Barry Oglesby commented on GEODE-2234:
--------------------------------------
I moved the queryExecution stat manipulation to the {{LuceneFunction}} execute
method instead of the {{IndexRepositoryImpl}} query method. That method
essentially counts the bucket queries rather than the top-level query. I
renamed the stats used by {{IndexRepositoryImpl}} so that we have those as well.
Here is gfsh output with 1 query:
{noformat}
gfsh>list lucene indexes --with-stats
Index Name | Region Path | Indexed Fields | Field Analyzer |
Status | Query Executions | Updates | Commits | Documents
----------- | ----------- | ------------------ | ----------------------- |
----------- | ---------------- | ------- | ------- | ---------
cusip_index | /data | [cusip] | {} |
Initialized | 1 | 328 | 315 | 328
cusip_index | /data | [cusip] | {} |
Initialized | 1 | 335 | 323 | 335
cusip_index | /data | [cusip] | {} |
Initialized | 1 | 337 | 318 | 337
{noformat}
> Lucene query hit stats shows number higher than number of calls
> ---------------------------------------------------------------
>
> Key: GEODE-2234
> URL: https://issues.apache.org/jira/browse/GEODE-2234
> Project: Geode
> Issue Type: Bug
> Components: lucene
> Reporter: Barry Oglesby
> Assignee: Barry Oglesby
>
> Scenario:
> System with 0 entries
> Add 2 entries
> Query 1 time.
> Add the same 2 entries (update)
> Query 1 time.
> Result:
> {noformat}
> gfsh>list lucene indexes --with-stats
> Index Name | Region Path | Indexed Fields | Field Analyzer | Query Executions
> | Updates | Commits | Documents
> ---------- | ----------- | -------------- | -------------- | ----------------
> | ------- | ------- | ---------
> customerF1 | /Customer | [f1] | {} | 0
> | 0 | 0 | 0
> customerF1 | /Customer | [f1] | {} | 0
> | 0 | 0 | 0
> gfsh>list lucene indexes --with-stats
> Index Name | Region Path | Indexed Fields | Field Analyzer | Query Executions
> | Updates | Commits | Documents
> ---------- | ----------- | -------------- | -------------- | ----------------
> | ------- | ------- | ---------
> customerF1 | /Customer | [f1] | {} | 112
> | 2 | 2 | 1
> customerF1 | /Customer | [f1] | {} | 114
> | 2 | 2 | 1
> gfsh>list lucene indexes --with-stats
> Index Name | Region Path | Indexed Fields | Field Analyzer | Query Executions
> | Updates | Commits | Documents
> ---------- | ----------- | -------------- | -------------- | ----------------
> | ------- | ------- | ---------
> customerF1 | /Customer | [f1] | {} | 224
> | 3 | 3 | 1
> customerF1 | /Customer | [f1] | {} | 228
> | 3 | 3 | 1
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)