fun suggestKeywords()

in core/search/src/main/kotlin/io/klibs/core/search/SearchController.kt [265:285]


    fun suggestKeywords(
        @RequestParam(required = false)
        @Parameter(
            description = "Arbitrary full text search query",
            example = "kotlinx"
        )
        query: String?,

        @RequestParam("limit", required = false, defaultValue = "5")
        @Parameter(
            description = "The size of the page to be returned",
            schema = Schema(type = "integer", minimum = "1", maximum = "100", defaultValue = "5")
        )
        limit: Int
    ): WordSuggestionDTO {
        require(limit in 1..100) {
            "Limit must be in 1..100"
        }

        return WordSuggestionDTO(suggestService.suggestWords(query, limit))
    }