diff --git a/Week10/elasticsearch.md b/Week10/elasticsearch.md index 497c32f..54ab7cc 100644 --- a/Week10/elasticsearch.md +++ b/Week10/elasticsearch.md @@ -246,14 +246,14 @@ Let's create a query and search for entries that contain the work "scaffolding" When executing this query: curl -XPOST http://localhost:9200/entries/_search -d ' - quote> { - quote> "query":{ - quote> "query_string": { - quote> "query": "scaffolding", - quote> "default_field" : "data" - quote> } - quote> } - quote> }' + { + "query":{ + "query_string": { + "query": "scaffolding", + "default_field" : "data" + } + } + }' {"took":3,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.095891505,"hits":[{"_index":"entries","_type":"entry","_id":"2","_score":0.095891505,"_source":{ "title": "Ruby on rails is just a bubble in bathtub", "data": "Yeah, Ruby on rails is awesome, but scaffolding is not!", @@ -372,4 +372,4 @@ The following code takes all executions in and looks at the properties key and t We take both the key and token properties and tell elastic search to store these single fields as two properties. First as the original string which we say is not analyzed, which means that if we now query the propertie key by key.original_key then we are asking elastic to filter out where each key is exactly as it was when it got saved (ex. ```second.py-cool_function```). -On the other hand if we still want to be able to look it up in a clever way elastic has also saved the properties like it wants to. So if we query by key as before we'll get the key split up on dashes like the default mapping behavior wants to. You can read more about mapping [here](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html) \ No newline at end of file +On the other hand if we still want to be able to look it up in a clever way elastic has also saved the properties like it wants to. So if we query by key as before we'll get the key split up on dashes like the default mapping behavior wants to. You can read more about mapping [here](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html)