python - Elastic Search query filtering -


i have uploaded data elastic server " job id , job place , job req , job desc ". index my_index , doctype = job_list.

i need write query find particular term " data analyst " , should give me matching results specified field " job place " .

ie, data analyst term matching in documents , , need have "job place" information only.

any help. tried curd . not working. if in python good.

from elasticsearch import elasticsearch es = elasticsearch([{'host': 'your_host', 'port': 9200}])  q = {"filter":          {"term":              {"job desc": "data analyst"}         },      "_source": {             "include": ['job place']         }     } # assume want "data analyst" in "job desc" field  result = es.search(index='my_index', doc_type='job_list', body=q) 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -