Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node searches on arrays of objects #28

Open
jumpinvestor opened this issue Aug 13, 2021 · 1 comment
Open

Node searches on arrays of objects #28

jumpinvestor opened this issue Aug 13, 2021 · 1 comment
Labels
question Further information is requested

Comments

@jumpinvestor
Copy link

For the Node version, is it possible to run comparisons on arrays of objects?

For example, for using it with map data, the query would be a tuple of a map point coordinates: [latitude, longitude].

The material to compare against would be an array of objects similar to:

[ { objectId: 123, someOtherObjectData: string, coordinates: [latitude, longitude] }, { next object }, { next object} ... ]

If so, would it be possible to provide a few pointers or a basic example?

Thanks much!

@salamer salamer added the question Further information is requested label Aug 15, 2021
@tang3848366
Copy link
Collaborator

Sorry, node hasn't payload inline, We may support it in future.
fn search(&self, item: &[E], k: usize) -> Vec<T>
It only return the idx of the nearest node
Returned idx is the same as insertion order

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants