-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Subhobrata Dey <[email protected]>
- Loading branch information
Showing
3 changed files
with
43 additions
and
3 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
30 changes: 30 additions & 0 deletions
30
...earch/securityanalytics/correlation/index/codec/correlation9120/CorrelationCodec9120.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.correlation9120; | ||
|
||
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 CorrelationCodec9120 extends FilterCodec { | ||
private static final CorrelationCodecVersion VERSION = CorrelationCodecVersion.V_9_12_0; | ||
private final PerFieldKnnVectorsFormat perFieldCorrelationVectorsFormat; | ||
|
||
public CorrelationCodec9120() { | ||
this(VERSION.getDefaultCodecDelegate(), VERSION.getPerFieldCorrelationVectorsFormat()); | ||
} | ||
|
||
public CorrelationCodec9120(Codec delegate, PerFieldKnnVectorsFormat perFieldCorrelationVectorsFormat) { | ||
super(VERSION.getCodecName(), delegate); | ||
this.perFieldCorrelationVectorsFormat = perFieldCorrelationVectorsFormat; | ||
} | ||
|
||
@Override | ||
public KnnVectorsFormat knnVectorsFormat() { | ||
return perFieldCorrelationVectorsFormat; | ||
} | ||
} |
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,2 +1,3 @@ | ||
org.opensearch.securityanalytics.correlation.index.codec.correlation950.CorrelationCodec950 | ||
org.opensearch.securityanalytics.correlation.index.codec.correlation990.CorrelationCodec990 | ||
org.opensearch.securityanalytics.correlation.index.codec.correlation990.CorrelationCodec990 | ||
org.opensearch.securityanalytics.correlation.index.codec.correlation9120.CorrelationCodec9120 |