Easy-Es Easy-Es
💋Home
  • v2.0.0(current version)
  • What's New

    • What' s New In Easy-Es v2.0.0?
  • history version

    • v1.x.x
  • Upgrade guide

    • Upgrade to 2.x.x instructions
💖Support
  • OS Community
  • Recommend Goods
  • Project PPT (opens new window)
  • Project introduction
  • Project members
  • PR
Join
Customer
  • Doc-Apis (opens new window)
  • Fitness plan automatic generation system (opens new window)
  • Vuepress-theme-vdoing (opens new window)
  • Gitee (opens new window)
  • Github (opens new window)
  • 简体中文 (opens new window)
  • English (opens new window)

adv display by random ❤️become sponsor
💋Home
  • v2.0.0(current version)
  • What's New

    • What' s New In Easy-Es v2.0.0?
  • history version

    • v1.x.x
  • Upgrade guide

    • Upgrade to 2.x.x instructions
💖Support
  • OS Community
  • Recommend Goods
  • Project PPT (opens new window)
  • Project introduction
  • Project members
  • PR
Join
Customer
  • Doc-Apis (opens new window)
  • Fitness plan automatic generation system (opens new window)
  • Vuepress-theme-vdoing (opens new window)
  • Gitee (opens new window)
  • Github (opens new window)
  • 简体中文 (opens new window)
  • English (opens new window)
  • Quick start

    • Introduction.md
    • Applicable scene
    • Worry free
    • Avoid pit
    • Quick start
    • Springboot demo
    • Spring Integration Guide
    • Solon Integration Guide
    • Config
    • Annotation
  • Core function

    • Condition constructor

      • Introduction of Wrapper
      • Index wrapper
      • Select wrapper
      • Update wrapper
    • Index CRUD

      • Index hosting model
      • Index CRUD
    • Data CRUD

      • Data synchronization solutions
      • Data CRUD
    • Multiple data sources support
    • Dynamic indexing support
    • Four nested query
    • Chain call
  • Extended function

    • Mixed query
    • Origin query
    • Page
    • Nested
    • Join parent child
    • Get DSL
    • ExecuteDSL
    • Execute SQL
    • Custom RequestOptions
      • Set RequestOptions
    • Custom default method
  • High-level syntax

    • Field filtering
    • Sort
    • Aggregation
    • Match&fuzzy match
    • Weight
    • Highlight
    • Geo
    • IP
  • Plugin

    • Plugin
  • Other

    • Faq
    • Difference from MP
    • MySQL and EE syntax comparison
    • Update log
    • Update plan
    • Copyright
    • Thanks
  • v2.xDoc
  • Extended function
LaoHan
2024-03-24
目录

Custom RequestOptions

# Set RequestOptions

The built-in framework uses the default RequestOptions of RestHighLevelClient, that is, RequestOptions.DEFAULT. In most scenarios, it is OK to use the default RequestOptions. However, there are very few personalized usage scenarios that require personalized settings. Meet business needs. For example, when querying some oversized fields, an error message appears: "entity content is too long [168583249] for the configured buffer limit [104857600]". At this time, you can increase the buffer size by customizing RequestOptions.

API

     //Set the RequestOptions of the current mapper. After setting, it will permanently reside in the jvm cache. Subsequent CRUD will use this RequestOptions and will only become invalid after restarting the project.
     Boolean setRequestOptions(RequestOptions requestOptions);
1
2

##use

     @Test
     public void testSetRequestOptions() {
         // This case is for reference only. It can be customized and expanded according to business needs.
         RequestOptions.Builder options = RequestOptions.DEFAULT.toBuilder();
         options.setHttpAsyncResponseConsumerFactory(new HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory(4 * 104857600));
         final RequestOptions requestOptions = options.build();
         documentMapper.setRequestOptions(requestOptions);
     }
1
2
3
4
5
6
7
8

Warm reminder

If not set, the default RequestOptions.DEFAULT will be used. If set, it will take effect globally for the current mapper. If there are multiple mappers, they can be set as needed according to the business scenario.

Help us improve this document (opens new window)
Last update: 2024/03/29
Execute SQL
Custom default method

← Execute SQL Custom default method→

Theme by Vdoing | Copyright © 2021-2025 LaoHan | Zhejiang ICP No. 2022020479 | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式