Elasticsearch

  • Fuzzy matching
  • Good at searching for text in a document db or unstructured data
  • Is essentially a highly-indexed database
  • Ranks results based on how close they are to the query
  • Filtering data
  • Good for unstructured data
  • Create reverse- indexes on fields in the DB to search for them

Elasticsearch stores documents, indexes, mappings, and fields

  • Documents are docs, JSON objects, etc.
  • Indexes - Like a database table. It's a collection of searchable documents
  • Within each index you can specify mappings. These are key: type mappings of fields you will want to search on efficiently
  • Elasticsearch maps terms (words, numbers) to document IDs

Reverse Indexes

  • Features that we want to quickly search for - e.g. Tweets, usernames
  • You can use something like CDC - change data capture which can update Elasticsearch whenever content in the db changes
  • This is a mapping of terms to the documents that contain them

Geospatial indexes