Skip to content

Instantly share code, notes, and snippets.

@mfeingold
mfeingold / mapping,json
Created October 12, 2012 21:11
els mapping
{
"settings" : {
"index" : {
"number_of_shards" :8,
"number_of_replicas" : 0,
"analysis" : {
"filter" :
{
"name_phonetic" : {
"replace" : false,
@mfeingold
mfeingold / els query
Created October 12, 2012 21:07
els query
{"query":{"bool":{"should":[{"text_phrase":{"name_addres":{"query":"260420146 michael smith 600 n college avenue","boost":1}}},{"text":{"name_address.partial":{"query":"260420146 michael smith 600 n college avenue","fuzziness":0.85,"prefix_length":2}}},{"text":{"name.phonetic":"260420146 michael smith 600 n college avenue"}},{"text":{"tins":{"query":"260420146 michael smith 600 n college avenue","boost":2}}},{"text":{"tins.partial":{"query":"260420146 michael smith 600 n college avenue","fuzziness":0.85,"prefix_length":2}}},{"text":{"npis":{"query":"260420146 michael smith 600 n college avenue","boost":2}}},{"text":{"npis.partial":{"query":"260420146 michael smith 600 n college avenue","fuzziness":0.85,"prefix_length":2}}}]}},"explain":"true","highlight":{"pre_tags":["<strong>","<strong>"],"post_tags":["</strong>","</strong>"],"fields":{"name_address.partial":{},"tins.partial":{},"npis.partial":{}}}}
@mfeingold
mfeingold / els query result.json
Created October 12, 2012 20:54
els query result
{"took":493,"timed_out":false,"_shards":{"total":8,"successful":8,"failed":0},"hits":{"total":4361719,"max_score":0.052822497,"hits":[{"_shard":7,"_node":"uWC2TeE3QruhAIERlLK0qw","_index":"physicians","_type":"Physician","_id":"109743406","_score":0.052822497,"_source":{"practitioner_id":5012277,"address_id":689437,"client_id":186,"plan_id":0,"facet_id":"000","name_address":"KATHY LANGEVIN 2732 N ALVERNON WAY, TUCSON, AZ, 85712","ids":"5203823330","name":"KATHY LANGEVIN","address":"2732 N ALVERNON WAY, TUCSON, AZ, 85712","city":"TUCSON","state":"AZ","county":"PIMA","zip":"85712","tins":"2732 N Al","npis":"","phone":"5203823330","id":109743406,"score":0},"highlight":{"name_address.partial":["KATHY LANGEVIN 2732 <strong>N</strong> ALVERNON WAY, TUCSON, AZ, 85712"]},"_explanation":{"value":0.052822497,"description":"product of:","details":[{"value":0.18487874,"description":"sum of:","details":[{"value":0.0004238877,"description":"product of:","details":[{"value":0.0029672137,"description":"sum of:","details":[{"
{
"settings" : {
"index" : {
"analysis" : {
"filter" :
{
"first_name_synonyms" : {
"type" : "synonym",
"synonyms_path" : synonym.txt"
},