https://github.com/codelibs/elasticsearch-lang-velocity
Velocity language for Elasticsearch
https://github.com/codelibs/elasticsearch-lang-velocity
Last synced: 2 months ago
JSON representation
Velocity language for Elasticsearch
- Host: GitHub
- URL: https://github.com/codelibs/elasticsearch-lang-velocity
- Owner: codelibs
- License: apache-2.0
- Created: 2014-11-13T14:16:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-11-22T20:59:08.000Z (over 1 year ago)
- Last Synced: 2025-03-30T18:04:36.347Z (3 months ago)
- Language: Java
- Homepage:
- Size: 98.6 KB
- Stars: 3
- Watchers: 7
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Elasticsearch Velocity Lang Plugin
=======================## Overview
This plugin add Velocity language to Elasticsearch.
## Version
[Versions in Maven Repository](https://repo1.maven.org/maven2/org/codelibs/elasticsearch-lang-velocity/)
### Issues/Questions
Please file an [issue](https://github.com/codelibs/elasticsearch-lang-velocity/issues "issue").
## Installation
$ $ES_HOME/bin/elasticsearch-plugin install org.codelibs:elasticsearch-lang-velocity:7.6.0
## References
This plugin supports an executable script language(search script is not supported).
### Using on Script-based Search Template
Using [Script-based Search Template](https://github.com/codelibs/elasticsearch-sstmpl "Script-based Search Template") Plugin, you can search by Velocity template.
GET /_search/script_template
{
"lang": "velocity",
"inline": "{\"query\": {\"match\": {\"title\": \"${query_string}\"}}}",
"params": {
"query_string": "search for these words"
}
}### Where is a root directory for Velocity's template
The directory is ${es.config}/scripts.
The file extension for Velocity's template is .vm or .velocity.### Use Template Cache
To use a template cache for Velocity template, please prepend "##cache" to the template file.