-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature findings api enhancements #914
Changes from all commits
2ffe265
705988f
854c44c
8bb1d7e
303493c
d6a914e
d8d4051
0eb7dce
6b2a15c
0804c8b
b9349c1
5a80380
13f74db
02f7000
8a7c3d8
b29cd33
7a63ec0
ccc84ea
dae015b
b45660b
5ba7a0f
a5adf95
369ca7d
c15e577
02fc845
de8bf2f
2587fca
f3eb85d
f20ed7f
8fc5960
19ff06e
d8043ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,14 +42,12 @@ | |
import org.opensearch.tasks.Task; | ||
import org.opensearch.threadpool.ThreadPool; | ||
import org.opensearch.transport.TransportService; | ||
|
||
|
||
import static org.opensearch.securityanalytics.util.DetectorUtils.DETECTOR_TYPE_PATH; | ||
import static org.opensearch.securityanalytics.util.DetectorUtils.MAX_DETECTORS_SEARCH_SIZE; | ||
import static org.opensearch.securityanalytics.util.DetectorUtils.NO_DETECTORS_FOUND; | ||
import static org.opensearch.securityanalytics.util.DetectorUtils.NO_DETECTORS_FOUND_FOR_PROVIDED_TYPE; | ||
|
||
public class TransportGetFindingsAction extends HandledTransportAction<GetFindingsRequest, GetFindingsResponse> implements SecureTransportAction { | ||
|
||
private final TransportSearchDetectorAction transportSearchDetectorAction; | ||
|
||
private final NamedXContentRegistry xContentRegistry; | ||
|
@@ -182,6 +180,7 @@ private static SearchRequest getSearchDetectorsRequest(GetFindingsRequest findin | |
MatchAllQueryBuilder queryBuilder = QueryBuilders.matchAllQuery(); | ||
searchSourceBuilder.query(queryBuilder); | ||
} | ||
searchSourceBuilder.size(MAX_DETECTORS_SEARCH_SIZE); // Set the size to 10000 | ||
searchSourceBuilder.fetchSource(true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we dont pass size, it defaults to 10 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. won't consider more than 10 detector's findings There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, make sense. I had this earlier, i removed it in mid while developing this. Added back |
||
SearchRequest searchRequest = new SearchRequest(); | ||
searchRequest.indices(Detector.DETECTORS_INDEX); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
*
importsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed