Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/org/opensearch/ubi/QueryRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class QueryRequest {
* @param userQuery The user-entered query.
* @param clientId The ID of the client that initiated the query.
* @param query The raw query.
* @param application The application that initiated the query.
* @param queryAttributes An optional map of additional attributes for the query.
* @param queryResponse The {@link QueryResponse} for this query request.
*/
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/opensearch/ubi/UbiPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,22 @@
*/
public class UbiPlugin extends Plugin implements ActionPlugin, SearchPlugin, TelemetryAwarePlugin {

/**
* The index name used for storing User Behavior Insights queries data.
*/
public static final String UBI_QUERIES_INDEX = "ubi_queries";
/**
* The index name used for storing User Behavior Insights events data.
*/
public static final String UBI_EVENTS_INDEX = "ubi_events";

/**
* Path to the JSON file containing the mapping configuration for the events index.
*/
public static final String EVENTS_MAPPING_FILE = "/events-mapping.json";
/**
* Path to the JSON file containing the mapping configuration for the queries index.
*/
public static final String QUERIES_MAPPING_FILE = "/queries-mapping.json";

private ActionFilter ubiActionFilter;
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/opensearch/ubi/UbiRestHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
import static org.opensearch.ubi.UbiPlugin.UBI_EVENTS_INDEX;
import static org.opensearch.ubi.UbiPlugin.UBI_QUERIES_INDEX;

/**
* REST handler for User Behavior Insights Plugin operations.
* Provides endpoints for initializing UBI indices and mappings.
*/
public class UbiRestHandler extends BaseRestHandler {

private static final Logger LOGGER = LogManager.getLogger(UbiRestHandler.class);
Expand All @@ -43,6 +47,13 @@ public class UbiRestHandler extends BaseRestHandler {
* URL for initializing the plugin and the index mappings.
*/
public static final String INITIALIZE_URL = "/_plugins/ubi/initialize";

/**
* Creates a new instance of {@link UbiRestHandler}.
*/
public UbiRestHandler() {
// Default constructor
}

@Override
public String getName() {
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/org/opensearch/ubi/UbiSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@
import java.util.List;

/**
* The UBI settings.
* Utility class for UBI settings.
*/
public class UbiSettings {

/**
* Private constructor to prevent instantiation as this is a utility class with static methods.
*/
private UbiSettings() {
// Private constructor to prevent instantiation
}

/**
* The name of the Data Prepper http_source URL for receiving queries.
*/
Expand Down
Loading