elasticsearch,Java,elasticsearch" /> elasticsearch,Java,elasticsearch" />

Java elasticsearch未能在路径下找到嵌套对象

Java elasticsearch未能在路径下找到嵌套对象,java,elasticsearch,Java,elasticsearch,您好,我有这个ood错误,在elasticsearch搜索数据时,我得到这个错误 ` ` 有趣的是,当搜索字段中没有输入任何参数时,它就工作了。系统复制到另一个系统,在另一个系统上工作。这一切都是自动生成的 嵌套查询 ` ` 我对它非常着迷,任何关于它为什么不工作的想法都很好。确保两个系统上的映射相等!我不知道这是否与您的问题有关,但在第7行的“query”中缺少一个“m”:“ntComments.coment:(blablablabla)”这是stackoverflow中的键入错误。映射是相等

您好,我有这个ood错误,在elasticsearch搜索数据时,我得到这个错误

`

`

有趣的是,当搜索字段中没有输入任何参数时,它就工作了。系统复制到另一个系统,在另一个系统上工作。这一切都是自动生成的

嵌套查询 `

`


我对它非常着迷,任何关于它为什么不工作的想法都很好。

确保两个系统上的映射相等!我不知道这是否与您的问题有关,但在第7行的
“query”中缺少一个“m”:“ntComments.coment:(blablablabla)”
这是stackoverflow中的键入错误。映射是相等的,因为更改的只是标签。
[2017-11-09 18:14:30,977][DEBUG][action.search            ] [Xorn] All shards failed for phase: [query]
RemoteTransportException[[Xorn][127.0.0.1:9300][indices:data/read/search[phase/query]]]; nested: SearchParseException[failed to parse search source [{"from":0,"size":15,"query":{"bool":{"must":[{"query_string":{"query":"ctDossierType:(TrademarkApplication)"}},{"nested":{"query":{"bool":{"must":{"query_string":{"query":"ntComments.comment:(xcbxcv)"}}}},"path":"ntComments"}},{"nested":{"query":{"bool":{"must":{"query_string":{"query":"ntComments.comment:(xcbxcv)"}}}},"path":"ntComments"}},{"nested":{"query":{"bool":{"must":{"query_string":{"query":"ntComments.comment:(xcbxcv)"}}}},"path":"ntComments"}},{"query_string":{"query":"design:(false)"}}]}},"sort":[{"stComparableApplicationNumber":{"order":"desc","missing":"_last","ignore_unmapped":true}}]}]]; nested: QueryParsingException[[nested] failed to find nested object under path [ntComments]];
Caused by: SearchParseException[failed to parse search source [{"from":0,"size":15,"query":{"bool":{"must":[{"query_string":{"query":"ctDossierType:(TrademarkApplication)"}},{"nested":{"query":{"bool":{"must":{"query_string":{"query":"ntComments.comment:(xcbxcv)"}}}},"path":"ntComments"}},{"nested":{"query":{"bool":{"must":{"query_string":{"query":"ntComments.comment:(xcbxcv)"}}}},"path":"ntComments"}},{"nested":{"query":{"bool":{"must":{"query_string":{"query":"ntComments.comment:(xcbxcv)"}}}},"path":"ntComments"}},{"query_string":{"query":"design:(false)"}}]}},"sort":[{"stComparableApplicationNumber":{"order":"desc","missing":"_last","ignore_unmapped":true}}]}]]; nested: QueryParsingException[[nested] failed to find nested object under path [ntComments]];
{
  "nested" : {
    "query" : {
      "bool" : {
        "must" : {
          "query_string" : {
            "query" : "ntComments.comment:(blablabla)"
          }
        }
      }
    }
    "path" : "ntComments"
  }
} `

nested bool query


`{
   "bool" : {
    "must" : {
     "query_string" : {
      "query" : "ntComments.comment:(blablabla)"
     }
    }
   }
  }
 ntComments
 must : {
  "bool" : {
   "must" : [ {
    "query_string" : {
     "query" : "ctDossiertype:(typetypetype)"
    }
   }, { 
    "nested" : {
     "query" : {
      "bool" : {
       "must" : {
        "query_string" : {
         "query" : "ntComments.comment:(blablabla)"
        }
       }
      }
     },
     "path" : "ntComments"
    }
   }, {
    "nested" : {
     "query" : {
      "bool" : {
       "must" : {
        "query_string" : {
         "query" : "ntComments.comment:(blablabla)"
        }
       }
      }
     }, 
     "path" : "ntComments"
    }
   }]
  }
 }