public static boolean isIndexRequest()

in source/src/main/java/com/amazonaws/comprehend/esproxy/lambda/utils/RequestIdentifier.java [51:60]


    public static boolean isIndexRequest(@NonNull Request esRequest) {
        // the path should contain /index/type/ or /index/type/id
        // type shouldn't be _search
        String[] pathFields = esRequest.getEndpoint().substring(1).split("/");

        return (pathFields.length == Constants.INDEX_PATH_LENGTH
                || pathFields.length == Constants.INDEX_PATH_LENGTH_WITHOUT_ID)
                && !Constants.SEARCH_REQUEST.equals(pathFields[1])
                && pathFields[0].matches(Constants.INDEX_REGEX);
    }