Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: John Mazanec <[email protected]>
  • Loading branch information
jmazanec15 committed Jan 28, 2025
1 parent 16c255d commit c61bd14
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add binary index support for Lucene engine. (#2292)[https://github.com/opensearch-project/k-NN/pull/2292]
- Add expand_nested_docs Parameter support to NMSLIB engine (#2331)[https://github.com/opensearch-project/k-NN/pull/2331]
- Add cosine similarity support for faiss engine (#2376)[https://github.com/opensearch-project/k-NN/pull/2376]
- Add derived source feature for vector fields (#2449)[https://github.com/opensearch-project/k-NN/pull/2449]
### Enhancements
- Introduced a writing layer in native engines where relies on the writing interface to process IO. (#2241)[https://github.com/opensearch-project/k-NN/pull/2241]
- Allow method parameter override for training based indices (#2290) https://github.com/opensearch-project/k-NN/pull/2290]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package org.opensearch.knn.index.codec.derivedsource;

import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.PostingsEnum;
Expand All @@ -26,22 +27,13 @@
import static org.apache.lucene.search.DocIdSetIterator.NO_MORE_DOCS;

@Log4j2
@AllArgsConstructor
public class NestedPerFieldDerivedVectorInjector implements PerFieldDerivedVectorInjector {

private final FieldInfo childFieldInfo;
private final DerivedSourceReaders derivedSourceReaders;
private final SegmentReadState segmentReadState;

public NestedPerFieldDerivedVectorInjector(
FieldInfo childFieldInfo,
DerivedSourceReaders derivedSourceReaders,
SegmentReadState segmentReadState
) {
this.childFieldInfo = childFieldInfo;
this.derivedSourceReaders = derivedSourceReaders;
this.segmentReadState = segmentReadState;
}

@Override
public void inject(Integer parentDocId, Map<String, Object> sourceAsMap) throws IOException {
// Setup the iterator. Return if not-relevant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@ public int firstChild() {
return previousParentDocId + 1;
}

/**
* Get the number of children for this parent.
*
* @return number of children for this parent
*/
public int numChildren() {
return children.size();
}

/**
* Get the next child for this parent
*
Expand Down

0 comments on commit c61bd14

Please sign in to comment.