npm install
npm start
open browser to http://localhost:4567/fuzzy/public/
a) Mongo Altas -> Create Search index on fuzzy->person fuzzy_person_searchindex
b) Mongo Compass -> Aggregate on AML
Stage 1: $search { index: "fuzzy_person_searchindex", text: { query: "erica", path: "primary_name", fuzzy:{} }, }
Stage 2: $limit { $limit: 5000 }
Stage 3: $project
{ _id: 0, primary_name: 1, type: 1, score: { $meta: "searchScore", } }
- curl localhost:4567/fuzzy/api/v1
- curl localhost:4567/fuzzy/api/v1/person/ping
- curl -H "content-type:application/json" -XPOST -d "{"name": "erica"}" localhost:4567/fuzzy/api/v1/person/search