File tree Expand file tree Collapse file tree 4 files changed +32
-1
lines changed
src/main/java/org/opensearch/ubi Expand file tree Collapse file tree 4 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public class QueryRequest {
4040 * @param userQuery The user-entered query.
4141 * @param clientId The ID of the client that initiated the query.
4242 * @param query The raw query.
43+ * @param application The application that initiated the query.
4344 * @param queryAttributes An optional map of additional attributes for the query.
4445 * @param queryResponse The {@link QueryResponse} for this query request.
4546 */
Original file line number Diff line number Diff line change 4949 */
5050public class UbiPlugin extends Plugin implements ActionPlugin , SearchPlugin , TelemetryAwarePlugin {
5151
52+ /**
53+ * The index name used for storing User Behavior Insights queries data.
54+ */
5255 public static final String UBI_QUERIES_INDEX = "ubi_queries" ;
56+ /**
57+ * The index name used for storing User Behavior Insights events data.
58+ */
5359 public static final String UBI_EVENTS_INDEX = "ubi_events" ;
5460
61+ /**
62+ * Path to the JSON file containing the mapping configuration for the events index.
63+ */
5564 public static final String EVENTS_MAPPING_FILE = "/events-mapping.json" ;
65+ /**
66+ * Path to the JSON file containing the mapping configuration for the queries index.
67+ */
5668 public static final String QUERIES_MAPPING_FILE = "/queries-mapping.json" ;
5769
5870 private ActionFilter ubiActionFilter ;
Original file line number Diff line number Diff line change 3535import static org .opensearch .ubi .UbiPlugin .UBI_EVENTS_INDEX ;
3636import static org .opensearch .ubi .UbiPlugin .UBI_QUERIES_INDEX ;
3737
38+ /**
39+ * REST handler for User Behavior Insights Plugin operations.
40+ * Provides endpoints for initializing UBI indices and mappings.
41+ */
3842public class UbiRestHandler extends BaseRestHandler {
3943
4044 private static final Logger LOGGER = LogManager .getLogger (UbiRestHandler .class );
@@ -43,6 +47,13 @@ public class UbiRestHandler extends BaseRestHandler {
4347 * URL for initializing the plugin and the index mappings.
4448 */
4549 public static final String INITIALIZE_URL = "/_plugins/ubi/initialize" ;
50+
51+ /**
52+ * Creates a new instance of {@link UbiRestHandler}.
53+ */
54+ public UbiRestHandler () {
55+ // Default constructor
56+ }
4657
4758 @ Override
4859 public String getName () {
Original file line number Diff line number Diff line change 1414import java .util .List ;
1515
1616/**
17- * The UBI settings.
17+ * Utility class for UBI settings.
1818 */
1919public class UbiSettings {
2020
21+ /**
22+ * Private constructor to prevent instantiation as this is a utility class with static methods.
23+ */
24+ private UbiSettings () {
25+ // Private constructor to prevent instantiation
26+ }
27+
2128 /**
2229 * The name of the Data Prepper http_source URL for receiving queries.
2330 */
You can’t perform that action at this time.
0 commit comments