apache / apache/geaflow

[geaflow/ai-memory] Add minimal ANN adapter interface

Open
#854 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
808
Forks
188
Avg merge
3d 22h
Merged PRs (30d)
2

Description

Priority: P1
Difficulty: Intermediate

Context: Current vector search is linear TopN. Phase 1 can ship with linear search, but the contract should allow an ANN implementation later.

Scope:

- Add `NearestNeighborIndex` interface.
- Provide linear adapter as default implementation.
- Add tests for deterministic scoring and tie-break order.

Constraints:

- Do not add heavy ANN dependency in this issue.
- Do not claim performance improvement.

Acceptance Criteria:

- Linear adapter passes the same contract that an ANN adapter will use.
- Tie-break behavior is documented.

Suggested paths:

- `geaflow-ai/src/main/java/org/apache/geaflow/ai/index/ann`

Contributor guide

Open the contributing guide

Research direction

Start in geaflow-ai/src/main/java/org/apache/geaflow/ai/index/ann and read the existing linear TopN search implementation and its tests. Define the NearestNeighborIndex contract, provide the linear adapter as the default, and add tests covering deterministic scoring and tie-break order. Done means the linear adapter satisfies the shared contract and the tie-break behavior is documented without adding an ANN dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.