[
https://issues.apache.org/jira/browse/METRON-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16209966#comment-16209966
]
ASF GitHub Bot commented on METRON-1255:
----------------------------------------
Github user merrimanr commented on a diff in the pull request:
https://github.com/apache/metron/pull/802#discussion_r145532341
--- Diff:
metron-platform/metron-elasticsearch/src/main/java/org/apache/metron/elasticsearch/dao/ElasticsearchMetaAlertDao.java
---
@@ -177,15 +178,18 @@ public MetaAlertCreateResponse
createMetaAlert(MetaAlertCreateRequest request)
public SearchResponse search(SearchRequest searchRequest) throws
InvalidSearchException {
// Wrap the query to also get any meta-alerts.
QueryBuilder qb = constantScoreQuery(boolQuery()
- .should(new QueryStringQueryBuilder(searchRequest.getQuery()))
- .should(boolQuery()
- .must(termQuery(MetaAlertDao.STATUS_FIELD,
MetaAlertStatus.ACTIVE.getStatusString()))
- .must(nestedQuery(
+ .must(boolQuery()
+ .should(new QueryStringQueryBuilder(searchRequest.getQuery()))
+ .should(nestedQuery(
ALERT_FIELD,
new QueryStringQueryBuilder(searchRequest.getQuery())
)
)
)
+ .must(boolQuery()
--- End diff --
Done in latest commit.
> MetaAlert search is not filtering on status
> -------------------------------------------
>
> Key: METRON-1255
> URL: https://issues.apache.org/jira/browse/METRON-1255
> Project: Metron
> Issue Type: Bug
> Reporter: Ryan Merriman
>
> Currently both active and inactive metaAlerts are being returned in a search.
> Only active metaAlerts should be returned.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)