elasticsearch Elastcisearch避免嵌套:TooManyClauseCount [maxClauseCount设置为1024]错误

62lalag4  于 7个月前  发布在  ElasticSearch
关注(0)|答案(1)|浏览(99)

这里我使用如下查询:
{ "query": { "filtered": { "query": { "bool": { "must": [ { "match_all": {} }, { "bool": { "should": [ { "bool": { "must": [ { "match": { "board_id": { "query": "german", "operator": "and" } } } ] } [2000 more blocks] ] } }, { "match": { "privacyLevel": { "query": "draft", "operator": "and" } } }, { "match": { "is_root": { "query": "true", "operator": "and" } } } ] } }, "filter": { "bool": { "must": { "terms": { "board_id": [ "german", "firewall@tkb", "uc_ms_gateway_vxml_gw@tkb", "thd_carrier_management_processes", "baw_delivery@tkb", "uc_cucm_media_resources@tkb", "virtualization@tkb", "ios_xr_pd_a9k_sip_700_lc_thor_eng@tkb", "nx_os_pi_security_eng@tkb", "dutch", "content_reviews@tkb", "KH_test@tkb", "day_2_analytics@tkb", "ios_xe_transports_infraservices_eng", "ios_xr_pd_ncs6k_infra_npu_driver@tkb", "cs-pi@tkb", "ios_xr_pd_ncs4k_packet_qos@tkb", "tz_release_notes@tkb", "trex@tkb", "ios_xr_pd_asr9k_vsm_eng@tkb", "ios_xr_pi_policymgr_qos_eng@tkb", "ucc_ucce_mobile_agent@tkb", "Third_Party_Integration@tkb", "meeting_management_cmm@tkb", "spitfire_interfaces_triage@tkb", "direct_to_tower_methods", "context_service@tkb", "CCIE-Data-Center@tkb", "wireless_service_reference_guides@tkb", "cisco_webex_control_hub@tkb", "ios_xr_ios_spa_eng@tkb", "dc_auto_intelligent_automation_cloud@tkb", "industrial_network_director@tkb", "context_service_uccx@tkb", "cef-dev-1@tkb", "scratch_staging@tkb", "ask-ucs-pm-1@tkb", "server_virtualization@tkb", "ucsdirector@tkb", "cisco_prime_collaboration_provisioning@tkb", "Test_tkb", "relay_em7mom_tkb", "voice_and_speech_recognition@tkb", "sbsc_wireless@tkb", "dc_support_inspur_catalyst_1@tkb", "ios_isrg1_g2s@tkb", "ucc_ucca_rsm@tkb", "Board2@tkb", "test_board-12347@tkb", "as@tkb", "vxlan_evpn_discussion_board@tkb", "stealthwatch_installation_and_upgrades@tkb", "spitfire_span_eng@tkb", "cognitive_intelligence_cta@tkb", "ios_xr_pd_ncs4k_infra_cctl@tkb", "sec_vpn_staging@tkb", "collaboration_webex_meetings_server@tkb", "sapphire_splunk_tkb", "esc_ultra_specific@tkb", "ces", "cloudsec_connector@tkb", "sss_asa_sfr_module_integration", "ios_xr_pd_ncs4k_infra_envmon@tkb", "ios_xr_pd_ncs6k_fwd_bundles@tkb", "csone@tkb", "ios_xe_policy_eng@tkb", "amp_private_cloud", "onprem@tkb", "duo@tkb", "collaboration_meetingplace_mp7xissues@tkb", "dfa@tkb", "dc_vxi_vdi_virtual_exp_infra@tkb", "msa_mrs_tkb", "uc_ms_qos@tkb", "compute_nova@tkb", "ios_ssh_eng@tkb", "big_data_broker@tkb", "4500_3700_3500_2960@tkb", "ofa_dpa_infra_de_eng@tkb", "nms_wireless_mse@tkb", "wea_broadband@tkb", "nx_ox_pi_eng@tkb", "sre_stakeholders", "SCA_issues@tkb", "ios_xr_pi_transports_eng@tkb", "tech_agnostic@tkb", "asa_firewall", "Policies-and-Identities@tkb", "packet_core_hardware@tkb", "Discussion_Board_Level2@tkb", "content_security_management_appliance", "productivity_tools@tkb", "UCSW@tkb", "context_aware_cx@tkb", "lansw_tech_port_interface@tkb", "dc_nexus5k_nexus5k2k@tkb", "virtualized_packet_core@tkb", "umts@tkb", "quicksilver_citrix@tkb", "wireless_assessments@tkb", "eng_packet_core_hardware@tkb", "virtual_application_cloud_segmentation_vacs_services@tkb", "dc_support_redhat_redhat@tkb", "sec_csm_staging@tkb", "problem_tracker", "network_insights@tkb", "thd_change_discussion@tkb", "ucc_ucca_mediasense@tkb", "ariba-db-connector@tkb", "cisco_security_awareness_tkb", "classic_ios_isr_serial_eng@tkb", "uc_ma_Cisco_Prime_Collaboration_and_Other@tkb", "stub_articles", "emerging_platforms@tkb", "Hardware_Relate@tkb", "Topic@tkb", "sre_high_level", "ios_xr_asr9k_ether_ea_bundles_pd_eng@tkb", "ExternalURLModeration_Archival_forum@tkb", "ios_xr_pd_ncs6k_infra_cpu@tkb", "cmcs@tkb", "9000@tkb", "cisco_design_certifications@tkb", "cmcs_discussions@tkb", "memory_component_issue@tkb", "dc_mds_hardware@tkb", "collaboration_meetingplace_mpe@tkb", "XR_TC2E_Training@tkb", "ios_xr_pd_ncs4k_infra_bp_driver@tkb", "cloudsec_web_filtering@tkb", "agile_scrum@tkb", "ios_xr_pd_ncs5500_bootloader_db@tkb", "security_car@tkb", "omd_db@tkb", "cco-team-1@tkb", "database_tkb", "docker_containers@tkb", "webex_calling_formerly_spark_call@tkb", "Investigations@tkb", "smart_account_and_licensing_glo@tkb", "virtualized_voice_browser@tkb", "ios_xr_pd_ncs6k_infra_ccc@tkb", "ucce_live_data@tkb", "psrr_ios_xr@tkb", "ios_xr_pd_srv6_eng@tkb", "Tools_Automation@tkb", "mantl@tkb", "vds_tv@tkb", "firex-reports-1@tkb", "chinese-tac-1@tkb", "nxos-urib-dev-1@tkb", "ios_xr_pd_ncs6k_fwd_ucode@tkb", "one_csdn@tkb", "cisco_webex_teams@tkb", "6500-tme@tkb", "firex-reports@tkb", "ios_xr_pd_asr9k_platform_manager_eng@tkb", "trackers@tkb", "cisco_software_manager_eng@tkb", "Test_Board@tkb", "rms@tkb", "vxlan_evpn_ansible@tkb", "web-help-1@tkb", "umbrella", "dc_sap_app_bwa@tkb", "vWSA@tkb", "rca_ts", "ios_xr_pd_crs_forward_multicast@tkb", "ncs_540_eng@tkb", "lancope_pilot@tkb", "situation_manager@tkb", "netsim@tkb", "security_acs@tkb", "ios_xr_pd_sf_fpd_db@tkb", "rms_discussions@tkb", "fwsm@tkb" ] } } } } } } }

我们可以进一步优化它,以避免错误。

nr7wwzry

nr7wwzry1#

首先,你应该尽快升级,1.7至少从2018年开始就已经停产了。直接升级是不可能的,不过,你最好把数据重新索引到更新的版本中,最好是最新的版本。
关于您的问题,您可以通过修改索引上的以下设置来“解决”它,并将其设置为足够高的值,以使错误消失:

PUT your-index/_settings
{
  "index.query.bool.max_clause_count": 2000
}

字符串
您也可以在集群设置中将其设置为应用于所有新索引:

PUT _cluster/settings
{
  "persistent": {
    "indices.query.bool.max_clause_count": 2000
  }
}


您需要知道,此设置默认为1024是有原因的,并且增加它可能会对您的集群产生其他不希望的后果。因此,您应该在增加此值时小心操作并仔细监视您的集群。

相关问题