0

I am trying to use

pyes.query.FunctionScoreQuery

in python but getting this error

NameError: name 'FunctionScoreQuery' is not defined

I am using PyES version 0.19.1. I tried to look for this function in the API though dir(pyes.query) but it doesn't list any class by this name. So can anybody tell me whether this functions exits and if it exists, can you provide an example of how to actually use it in code.

Waseem
  • 1,392
  • 5
  • 21
  • 30
  • Do you mean version 0.90.1..? What version of ElasticSearch are you using? – Drewness Mar 15 '14 at 20:17
  • I am using 0.90.7 ver of ElasticSearch. As far as the issue of 'FunctionScoreQuery' is not defined is concerned, I have found that it is available only in the development version but I still need some good example that shows how to use it in our code – Waseem Mar 15 '14 at 20:56
  • Start [here](http://pyes.readthedocs.org/en/latest/references/pyes.query.html#pyes.query.FunctionScoreQuery). Then if you run into problems, include _your_ code so we have some context. – Drewness Mar 15 '14 at 21:06
  • Actually I am not expert in elasticsearch and used some other simple queries before but really have no idea of this query "FunctionScoreQuery". Can you give me atleast one example of how to use our custom function for scoring. – Waseem Mar 15 '14 at 21:23

0 Answers0