Class SearchEngines
java.lang.Object
com.codename1.backend.search.SearchEngines
Opens the SearchEngine a configuration names, and finds the one of the
calling thread's server.
| Setting | Default | |
|---|---|---|
cn1.search.url |
database: |
see the package description; SEARCH_URL in the environment |
cn1.search.apiKey |
an Elasticsearch API key, sent as Authorization: ApiKey |
Without cn1.search.url, Spring Boot's spring.elasticsearch.uris (the first
of them, with spring.elasticsearch.username and .password) is used, so a
Spring configuration carries over. database: searches the database
cn1.datasource.url names.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SearchEnginecurrent()The engine of the calling thread's server: opened from its configuration the first time it is asked for, and closed when the server stops.static SearchEngineOpens the engineconfignames; the caller closes it.static SearchEngineOpens a search cluster by URL; the caller closes it.
-
Method Details
-
current
The engine of the calling thread's server: opened from its configuration the first time it is asked for, and closed when the server stops.- Throws:
IOException
-
open
Opens the engineconfignames; the caller closes it.- Throws:
IOException
-
open
Opens a search cluster by URL; the caller closes it.- Throws:
IOException
-