-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Joanne Wang <jowg@amazon.com> Co-authored-by: Andriy Redko <andriy.redko@aiven.io> (cherry picked from commit 988377a) Co-authored-by: Joanne Wang <jowg@amazon.com>
- Loading branch information
1 parent
3b58085
commit 4713ea0
Showing
13 changed files
with
112 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1 | ||
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...nsearch/securityanalytics/correlation/index/codec/correlation990/CorrelationCodec990.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package org.opensearch.securityanalytics.correlation.index.codec.correlation990; | ||
|
||
import org.apache.lucene.codecs.Codec; | ||
import org.apache.lucene.codecs.FilterCodec; | ||
import org.apache.lucene.codecs.KnnVectorsFormat; | ||
import org.apache.lucene.codecs.perfield.PerFieldKnnVectorsFormat; | ||
import org.opensearch.securityanalytics.correlation.index.codec.CorrelationCodecVersion; | ||
|
||
public class CorrelationCodec990 extends FilterCodec { | ||
private static final CorrelationCodecVersion VERSION = CorrelationCodecVersion.V_9_9_0; | ||
private final PerFieldKnnVectorsFormat perFieldCorrelationVectorsFormat; | ||
|
||
public CorrelationCodec990() { | ||
this(VERSION.getDefaultCodecDelegate(), VERSION.getPerFieldCorrelationVectorsFormat()); | ||
} | ||
|
||
public CorrelationCodec990(Codec delegate, PerFieldKnnVectorsFormat perFieldCorrelationVectorsFormat) { | ||
super(VERSION.getCodecName(), delegate); | ||
this.perFieldCorrelationVectorsFormat = perFieldCorrelationVectorsFormat; | ||
} | ||
|
||
@Override | ||
public KnnVectorsFormat knnVectorsFormat() { | ||
return perFieldCorrelationVectorsFormat; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...analytics/correlation/index/codec/correlation990/PerFieldCorrelationVectorsFormat990.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package org.opensearch.securityanalytics.correlation.index.codec.correlation990; | ||
|
||
import org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsFormat; | ||
import org.opensearch.index.mapper.MapperService; | ||
import org.opensearch.securityanalytics.correlation.index.codec.BasePerFieldCorrelationVectorsFormat; | ||
|
||
import java.util.Optional; | ||
|
||
public class PerFieldCorrelationVectorsFormat990 extends BasePerFieldCorrelationVectorsFormat { | ||
|
||
public PerFieldCorrelationVectorsFormat990(final Optional<MapperService> mapperService) { | ||
super( | ||
mapperService, | ||
Lucene99HnswVectorsFormat.DEFAULT_MAX_CONN, | ||
Lucene99HnswVectorsFormat.DEFAULT_BEAM_WIDTH, | ||
() -> new Lucene99HnswVectorsFormat(), | ||
(maxConn, beamWidth) -> new Lucene99HnswVectorsFormat(maxConn, beamWidth) | ||
); | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
src/main/resources/META-INF/services/org.apache.lucene.codecs.Codec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
org.opensearch.securityanalytics.correlation.index.codec.correlation950.CorrelationCodec | ||
org.opensearch.securityanalytics.correlation.index.codec.correlation950.CorrelationCodec950 | ||
org.opensearch.securityanalytics.correlation.index.codec.correlation990.CorrelationCodec990 |