https://github.com/eyedea-io/syncano-socket-annoy
Syncano Socket for Annoy (Approximate Nearest Neighbors Oh Yeah)
https://github.com/eyedea-io/syncano-socket-annoy
dating knn serverless syncano syncano-socket
Last synced: 5 months ago
JSON representation
Syncano Socket for Annoy (Approximate Nearest Neighbors Oh Yeah)
- Host: GitHub
- URL: https://github.com/eyedea-io/syncano-socket-annoy
- Owner: eyedea-io
- License: mit
- Created: 2018-08-29T12:22:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-28T14:19:28.000Z (about 2 years ago)
- Last Synced: 2025-08-08T16:29:11.101Z (5 months ago)
- Topics: dating, knn, serverless, syncano, syncano-socket
- Language: JavaScript
- Homepage: https://syncano.io
- Size: 166 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Syncano Socket for Annoy (Approximate Nearest Neighbors Oh Yeah)
[](https://syncano.io)
[](https://circleci.com/gh/eyedea-io/syncano-socket-annoy/tree/master)
[](https://codecov.io/github/eyedea-io/syncano-socket-annoy/)
[](https://standardjs.com)
[](https://www.npmjs.com/package/@eyedea-sockets/annoy)

Main Socket features:
* **annoy/match** — find nearest neighbours
## Getting Started
Install package in your project:
```sh
cd my_project
npm install @syncano/cli --save-dev
npm install @eyedea-sockets/annoy --save
npx s deploy
```
Use it:
```js
import Syncano from '@syncano/client'
const s = new Syncano()
// Search for a user
const params = {
model: 'profiles', // name of the data class
query: ['react', 'js'],
matchWith: [10,3]
}
const suggestions = await s.get('annoy/match', params)
// {
// distances: [ 1, 5, 8.062257766723633, 9.219544410705566 ],
// objects: [
// { username: 'qk', react: 10, js: 2, css: 3 },
// { username: 'gustavo', react: 5, js: 3, css: 7 },
// { username: 'pedro', react: 2, js: 2, css: 4 },
// { username: 'nik', react: 1, js: 1, css: 3 }
// ]
// }
```