Filter Exercise

  • Login into your ElasticSearch sandbox
  • Make sure elastic search is running:
    sudo service elasticsearch restart
    
  • Populate few sample data borrowed from data.gov:
    curl https://s3.us-east-2.amazonaws.com/elasticsearch-courseware/sample-data/collisions.txt -o collisions.txt
    curl -XPOST 'localhost:9200/_bulk' --data-binary "@collisions.txt"
    
  • Confirm there are some records to search on:
    curl 'localhost:9200/sample-data/collisions/_search?pretty=true'
    
  • How many documents did you find?
  • Pick couple of options to search on: different leaf and compound clauses, different field types
  • Rewrite your queries into filtered query
  • You will be asked to present your findings to others

results matching ""

    No results matching ""