# Mroonga User-Defined Functions

- [Creating Mroonga User-Defined Functions](https://mariadb.com/docs/server/server-usage/storage-engines/mroonga/mroonga-user-defined-functions/creating-mroonga-user-defined-functions.md): Instructions on how to manually create Mroonga's UDFs if they were not automatically installed, ensuring full functionality.
- [last\_insert\_grn\_id](https://mariadb.com/docs/server/server-usage/storage-engines/mroonga/mroonga-user-defined-functions/last_insert_grn_id.md): This UDF returns the unique ID assigned by Groonga for the last inserted record, useful for tracking internal record identifiers.
- [mroonga\_command](https://mariadb.com/docs/server/server-usage/storage-engines/mroonga/mroonga-user-defined-functions/mroonga_command.md): Execute raw Groonga commands directly from MariaDB using this UDF, allowing for advanced administration and inspection of the Groonga database.
- [mroonga\_escape](https://mariadb.com/docs/server/server-usage/storage-engines/mroonga/mroonga-user-defined-functions/mroonga_escape.md): This function escapes special characters in a string to make it safe for use in Mroonga full-text search queries.
- [mroonga\_highlight\_html](https://mariadb.com/docs/server/server-usage/storage-engines/mroonga/mroonga-user-defined-functions/mroonga_highlight_html.md): Highlight keywords within a text string using HTML tags, making it easy to display search results with matched terms emphasized.
- [mroonga\_normalize](https://mariadb.com/docs/server/server-usage/storage-engines/mroonga/mroonga-user-defined-functions/mroonga_normalize.md): This UDF normalizes a given string using Groonga's normalizers, ensuring consistent text processing for accurate indexing and searching.
- [mroonga\_snippet](https://mariadb.com/docs/server/server-usage/storage-engines/mroonga/mroonga-user-defined-functions/mroonga_snippet.md): This function extracts a snippet of text surrounding a keyword from a document, providing necessary context for search result displays.
- [mroonga\_snippet\_html](https://mariadb.com/docs/server/server-usage/storage-engines/mroonga/mroonga-user-defined-functions/mroonga_snippet_html.md): Similar to mroonga\_snippet, this function generates HTML-formatted snippets, automatically wrapping matched keywords in tags for web display.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/server-usage/storage-engines/mroonga/mroonga-user-defined-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
