Skip to content

Commit

Permalink
Adding notice file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Oct 9, 2024
1 parent cfdbbf5 commit 2a4677e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This code was adapted from the OpenSearch User Behavior Insights plugin at https://github.com/opensearch-proj/user-behavior-insights) under the Apache License, version 2.
5 changes: 1 addition & 4 deletions src/main/java/com/o19s/ubi/UbiActionFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,13 @@ private ActionResponse handleSearchRequest(final SearchRequest searchRequest, Ac

final SearchResponse searchResponse = (SearchResponse) response;


System.out.println(searchResponse.getProfileResults());

response = new UbiSearchResponse(
searchResponse.getHits(),
searchResponse.getAggregations(),
searchResponse.getSuggest(),
searchResponse.isTimedOut(),
searchResponse.isTerminatedEarly(),
null, // TODO: Where is this value?
null, // TODO: How to get the value for `profileResults`?
searchResponse.getNumReducePhases(),
searchResponse.getScrollId(),
searchResponse.getTotalShards(),
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/o19s/ubi/UbiSearchResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,13 @@ public UbiSearchResponse(
@Override
public XContentBuilder headerToXContent(XContentBuilder builder, ToXContent.Params params) throws IOException {

//builder.startObject();
innerToXContentChunked(params);

builder.startObject(EXT_SECTION_NAME);
builder.startObject(UbiParametersExtBuilder.UBI_PARAMETER_NAME);
builder.field(UBI_QUERY_ID_FIELD_NAME, this.queryId);
builder.endObject();
builder.endObject();
//builder.endObject();

return builder;

Expand Down

0 comments on commit 2a4677e

Please sign in to comment.