Skip to content

Commit

Permalink
Add javadocs
Browse files Browse the repository at this point in the history
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
  • Loading branch information
deshsidd committed Oct 9, 2023
1 parent 3a46da1 commit 2634bfe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
import org.opensearch.telemetry.metrics.MetricsRegistry;
import org.opensearch.telemetry.metrics.tags.Tags;

/**
* Class to categorize the search queries based on the type and increment the relevant counters.
* Class also logs the query shape.
*/
public class SearchQueryCategorizor {

private static final Logger log = LogManager.getLogger(SearchQueryCategorizor.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
import org.opensearch.telemetry.metrics.Counter;
import org.opensearch.telemetry.metrics.MetricsRegistry;

/**
* Class contains all the Counters related to search query types.
*/
public class SearchQueryCounters {
private final MetricsRegistry metricsRegistry;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import java.util.Locale;
import java.util.Map;

/**
* Class to traverse the QueryBuilder tree and capture the query shape
*/
public class QueryShapeVisitor implements QueryBuilderVisitor {
private final SetOnce<String> queryType = new SetOnce<>();
private final Map<BooleanClause.Occur, List<QueryShapeVisitor>> childVisitors = new EnumMap<>(BooleanClause.Occur.class);
Expand Down

0 comments on commit 2634bfe

Please sign in to comment.