Skip to content

Instantly share code, notes, and snippets.

@tehsven
Created February 6, 2019 23:28
Show Gist options
  • Save tehsven/00d74cd00b5aa441f7f781d69b7c39a2 to your computer and use it in GitHub Desktop.
Save tehsven/00d74cd00b5aa441f7f781d69b7c39a2 to your computer and use it in GitHub Desktop.
# Value Based Filtering
index = SearchIndex.new
index.add(0, {name: "Example name", price: 5.00})
index.search("example", filter: {price: 1.00})
=> returns nothing
index.search("example", filter: {price: 5.00})
=> returns Document 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment