Spring Data Elasticsearch-在查询的根级别上是否支持Inner Hit?

问题描述

我正在尝试使用ElasticsearchOperations来编写这样的查询:

      @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Center(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,children: [
            Container(
              height: MediaQuery.of(context).size.height * 0.65,child: Flex(
                direction: Axis.horizontal,children: [
                  Flexible(
                    child: PageView(
                      controller: _controller,//physics: new NeverScrollableScrollPhysics(),children: [
                        RegisterForm(),WelcomeForm(),//CompanyForm(),//CompanyNextForm(),//CompanyLogoForm(),//FinancingDataForm(),//UtilityForm(),//MatrixInformationForm(),//MatrixInformationNextForm(),//MatrixInformationLastForm(),//PriceBuildingForm(),//InstallKitForm(),//InstallKitDetailedForm(),//CustomPricingForm(),//CustomPricingNextForm(),//FillRow1Form(),//FillItem1Row1Form(),//FillItem2Row1Form(),//FillItem3Row1Form(),//FillRow2Form(),//FillItem1Row2Form(),//FillItem2Row2Form(),//FillItem3Row2Form(),//FillRow3Form(),//FillItem1Row3Form(),//FillItem2Row3Form(),//FillItem3Row3Form(),//InvoicingForm(),//FinancingForm(),//FinancingNextForm(),//FinancingLastForm(),//FinalizeForm(),//DoneForm(),//BookingForm(),],),SizedBox(
              height: ResponsiveLayout.isSmallScreen(context)
                  ? 10
                  : ResponsiveLayout.isMediumScreen(context)
                      ? 10
                      : 10,Opacity(
              opacity: 1,//currentIndex == 20 ? 0 : 1,child: Container(
                  height: 50,decoration: BoxDecoration(
                    color: Color.fromRGBO(16,88,198,1),borderRadius: BorderRadius.all(Radius.circular(8)),child: GestureDetector(
                    onTap: () {
                      _controller.nextPage(
                          duration: Duration(milliseconds: 300),curve: Curves.easeIn);
                    },child: Container(
                      width: MediaQuery.of(context).size.width,height: 100,decoration: BoxDecoration(
                        color: Color.fromRGBO(16,child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,children: <Widget>[
                          Container(
                              height: 100.0,child: Center(
                                child: RichText(
                                  text: TextSpan(children: [
                                    WidgetSpan(
                                        child: Text(
                                      'Continue  ',style: TextStyle(
                                        color: Colors.white,fontSize: ResponsiveLayout
                                                .isSmallScreen(context)
                                            ? 12
                                            : ResponsiveLayout.isMediumScreen(
                                                    context)
                                                ? 12
                                                : 15,)),WidgetSpan(
                                      child: Icon(
                                        Icons.arrow_forward,size: ResponsiveLayout.isSmallScreen(
                                                context)
                                            ? 12
                                            : ResponsiveLayout.isMediumScreen(
                                                    context)
                                                ? 12
                                                : 15,color: Colors.white,]),);
  }

我知道{ "query": { "bool": { "must": [ { "nested": { "path": "dialogLines","query": { "match_phrase": { "dialogLines.text": { "query": "No problem" } } } } } ] } },"collapse": { "field": "movieId","inner_hits" : { "name": "by_movie","collapse" : {"field" : "boundaryGroup"},"sort": [{ "boundaryStartInMillis": "desc" }],"size": 6 } } } 支持NestedQuery,但是类型innerHit(InnerHitBuilder innerHitBuilder)的根级别查询没有该方法。

是否可以使用ElasticsearchOperations编写此查询?

我的版本为NativeSearchQuery

运行Elasticsearch org.springframework.data:spring-data-elasticsearch:3.2.9.RELEASE

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)