Skip to content

Latest commit

 

History

History

java-main-vector-search

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

On-Device Vector Search Example: Cities

This command-line example application demonstrates how to perform on-device approximate nearest neighbor (ANN) search using cities and their coordinates.

It is possible to

  • list all cities (ls)
  • list cities with name starting with a prefix (ls A)
  • find nearest neighbors to a city (city_neighbors Zagreb)
  • find up to a maximum number of cities nearest to a set of coordinates (neighbors 3,40.416801,-3.703800)
  • add a city (add Custom,1.234,4.321)

All available commands are printed when starting the application.

Running

  • Run ./gradlew :java-main-vector-search:run on the command line
  • Run the Main class in your IDE

Docs