lucene - elasticsearch nested query with ruby gem -


I am using elasticsearch ruby ​​gem to connect to an ES server and currently with mapping below There is an index. I am trying to understand the proper syntax for the query of nested objects. Experiment with questions like the following, but getting errors. I was thinking that someone could start me on a proper syntax for a structure like this? Thanks!

  client = elasticsearch :: Client.new log: true client.search index: 'injury', nested: {path: {week: {id: '1'}}}   

Return:

  ElasticWest :: Transport :: Transport :: Errors :: BadRequest: [400] {"Error": "SearchPhaseExecutionException [Failed Phase Phase Sampling mapping:  
  {"injury": {"mapping": {"tbd": {"attribute": {"injury" {"Quality": {"quality": {"attribute": {"__content__": {"type": "string"}, "timezone": {"type": "string"}}}}}}} " Football ": {" attribute ": {" injuries ": {" "": {"Quality": {"attribute": {"__content__": {"type": "string"}, "time zone": {"property":} "}", "week": {"attribute "{" id ": {" type ":" string "}," passive players ": {" properties ": {" inactivePlayer ": {" property ": {" first name ": {" type ":" string "" "": "" "" "" "" String ": {" type ":" string "}," player id ": {" type ":" string "}," positi " {"property": {"type": "string"}, "teamId": {"type": "string"}}}}}, "wounded player": {"property": {"wounded player": {"displayName": {"type": "string"}, "first name": {"type": "string"}, "gameStatus": {"type" "": "string"}, "injury": {"Type": "string"}, "numeric "Name": {"type": "string"}, "player id": {"type": "string"}, "position": {"type": "string"}, "practicatatus": {"type "": "String"}, "string"}, "team id": {"type": "string"}}}}}, "weather": {"type": "string"}, "season type": {"type": " String "}}}}}}}}}    

any of your Query is not defined I think that should be something like this:

  "nested": {"Path": "Week "," Query ": {" Match ": {" week.id ":" 1 "}}} click on     or

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -