wolfgang-werner / picturesafe-search-starter

Spring Boot Starter for picturesafe-search, an open source library implementing an opinionated, fresh approach to implement new search/analytics enabled applications or enhance legacy software based on relational databases with powerful full text search capabilities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

picturesafe-search Spring Boot Starter

Spring Boot Starter for the picturesafe-search library.

Using the Starter

Create your Spring Boot application. In the pom.xml you need to add the following dependency:

<dependency>
    <groupId>de.picturesafe.search</groupId>
    <artifactId>picturesafe-search-spring-boot-starter</artifactId>
    <version>3.5.0-SNAPSHOT</version>
</dependency>

Spring Boot will configure everything required for picturesafe-search automatically.

You can now use the ElasticsearchService or the SingleIndexElasticsearchService as follows:

@SpringBootApplication
public class StarterDemoApplication implements CommandLineRunner {

    private static final Logger LOGGER = LoggerFactory.getLogger(StarterDemoApplication.class);

    @Autowired
    private SingleIndexElasticsearchService singleIndexElasticsearchService;

    public static void main(String[] args) {
        SpringApplication.run(StarterDemoApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        String elasticsearchServerVersion = singleIndexElasticsearchService
            .getElasticsearchInfo().getServerVersion();
        LOGGER.info("Elasticsearch version = {}", elasticsearchServerVersion);
    }
}

Spring Boot Starter Demo

Installation

The picturesafe-search Spring Boot Demo require a running Elasticsearch server from version 7.x.

  • Download and unpack the Elasticsearch official distribution.

  • Run bin/elasticsearch on Linux or macOS. Run bin\elasticsearch.bat on Windows.

Run Spring Boot Demo

Clone Maven project and run app from IDE or command line within folder picturesafe-search-spring-boot-demo.

Maven
mvn spring-boot:run

The application.properties correspond to the elasticsearch.template.properties of picturesafe-search.

For more information, please see following documentation.

About

Spring Boot Starter for picturesafe-search, an open source library implementing an opinionated, fresh approach to implement new search/analytics enabled applications or enhance legacy software based on relational databases with powerful full text search capabilities.

License:Apache License 2.0


Languages

Language:Java 100.0%