Skip to content

Commit

Permalink
added support for Elasticsearch 8.x, split code base into two flavors…
Browse files Browse the repository at this point in the history
… - OpenSearch and ES
  • Loading branch information
albogdano committed Mar 12, 2022
1 parent 7aa3818 commit fc3245c
Show file tree
Hide file tree
Showing 12 changed files with 5,977 additions and 2,144 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,29 @@ This plugin allows you to use Elasticsearch as the search engine for Para.

## Features

- Implements the Para `Search` interface using the high level REST client (HLRC)
- Implements the Para `Search` interface using the official Elasticsearch Java client
- Supports both Elasticsearch and OpenSearch servers
- Index sharing and multitenancy support through alias routing and filtering
- Supports both asynchronous and synchronous document operations
- Full pagination support for both "search-after" and "from-size" modes
- Proxy endpoint `/v1/_elasticsearch` - relays all requests directly to Elasticsearch (disabled by default)
- Supports AWS Elasticsearch Service with request signing

## Compatibility

ES Plugin version | Elasticsearch support | OpenSearch support
--- | --- | ---
`1.40.0` and above | `7.10.x` and above **(with config flag)** | `1.0.0` and above **(with config flag)**
`1.39.0` and below | up to `7.15.2` | `1.0.0` and above

After version `1.40.0` a configuration flag is required to destinguish between the two different flavors of Eleasticsearch:
```ini
para.es.flavor = "elasticsearch"
# ==== OR ==== #
para.es.flavor = "openSearch"
```
The default option here is `elasticsearch`.

## Documentation

### [Read the Docs](https://paraio.org/docs)
Expand All @@ -46,6 +62,9 @@ WAR file `para-x.y.z.war`. Para will look for plugins inside `lib` and pick up t

Here are all the configuration properties for this plugin (these go inside your `application.conf`):
```ini
# ES flavor - elasticsearch or opensearch
para.es.flavor = "elasticsearch"

# enable this to bypass the DB and read all data straight from ES
para.read_from_index = false
para.es.shards = 5
Expand Down
31 changes: 23 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
<skipTests>false</skipTests>
<skipITs>${skipTests}</skipITs>
<skipUTs>${skipTests}</skipUTs>
<elasticsearch.version>7.15.2</elasticsearch.version>
<elasticsearch.version>8.1.0</elasticsearch.version>
<jerseyVer>2.35</jerseyVer>
</properties>

<dependencies>
<dependency>
<groupId>com.erudika</groupId>
<artifactId>para-core</artifactId>
<version>1.44.0</version>
<version>1.45.1</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -92,12 +92,17 @@
<artifactId>opensearch-rest-high-level-client</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
<version>${elasticsearch.version}</version>
</dependency>

<!-- LOGGING -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
</dependency>

<!-- TESTING -->
Expand Down Expand Up @@ -125,28 +130,38 @@
<version>${jerseyVer}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.13</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.alexcojocaru</groupId>
<artifactId>elasticsearch-maven-plugin</artifactId>
<version>6.19</version>
<version>6.22</version>
<configuration>
<skip>${skipITs}</skip>
<!--<autoCreateIndex>false</autoCreateIndex>-->
<version>${elasticsearch.version}</version>
<flavour>default</flavour>
<clusterName>test</clusterName>
<tcpPort>9300</tcpPort>
<transportPort>9300</transportPort>
<httpPort>9200</httpPort>
<logLevel>ERROR</logLevel>
<timeout>240</timeout>
<instanceCount>1</instanceCount>
<instanceSettings>
<properties>
<xpack.security.enabled>false</xpack.security.enabled>
<!--<xpack.security.enabled>false</xpack.security.enabled>-->
</properties>
</instanceSettings>
</configuration>
Expand Down Expand Up @@ -291,9 +306,9 @@
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.6.0.1398</version>
<version>3.9.1.2184</version>
</plugin>

<plugin>
Expand Down
Loading

0 comments on commit fc3245c

Please sign in to comment.