############################## QUERY ENGINE CONFIG ############################

# The number of iterations to run while performing background indexing
# before we call usleep(1) (sleep for 1 micro-second) and make sure that we
# allow redis to process other commands.
# numeric, valid range: [1, UINT32_MAX], default: 100
#
# search-bg-index-sleep-gap 100

# The default dialect used in search queries.
# numeric, valid range: [1, 4], default: 1
#
# search-default-dialect 1

# the fork gc will only start to clean when the number of not cleaned document
# will exceed this threshold.
# numeric, valid range: [1, LLONG_MAX], default: 100
#
# search-fork-gc-clean-threshold 100

# interval (in seconds) in which to retry running the forkgc after failure.
# numeric, valid range: [1, LLONG_MAX], default: 5
#
# search-fork-gc-retry-interval 5

# interval (in seconds) in which to run the fork gc (relevant only when fork
# gc is used).
# numeric, valid range: [1, LLONG_MAX], default: 30
#
# search-fork-gc-run-interval 30

# the amount of seconds for the fork GC to sleep before exiting.
# numeric, valid range: [0, LLONG_MAX], default: 0
#
# search-fork-gc-sleep-before-exit 0

# Scan this many documents at a time during every GC iteration.
# numeric, valid range: [1, LLONG_MAX], default: 100
#
# search-gc-scan-size 100

# Max number of cursors for a given index that can be opened inside of a shard.
# numeric, valid range: [0, LLONG_MAX], default: 128
#
# search-index-cursor-limit 128

# Maximum number of results from ft.aggregate command.
# numeric, valid range: [0, (1ULL << 31)], default: 1ULL << 31
#
# search-max-aggregate-results 2147483648

# Maximum prefix expansions to be used in a query.
# numeric, valid range: [1, LLONG_MAX], default: 200
#
# search-max-prefix-expansions 200

# Maximum runtime document table size (for this process).
# numeric, valid range: [1, 100000000], default: 1000000
#
# search-max-doctablesize 1000000

# max idle time allowed to be set for cursor, setting it high might cause
# high memory consumption.
# numeric, valid range: [1, LLONG_MAX], default: 300000
#
# search-cursor-max-idle 300000

# Maximum number of results from ft.search command.
# numeric, valid range: [0, 1ULL << 31], default: 1000000
#
# search-max-search-results 1000000

# Number of worker threads to use for background tasks when the server is
# in an operation event.
# numeric, valid range: [0, 16], default: 4
#
# search-min-operation-workers 4

# Minimum length of term to be considered for phonetic matching.
# numeric, valid range: [1, LLONG_MAX], default: 3
#
# search-min-phonetic-term-len 3

# the minimum prefix for expansions (`*`).
# numeric, valid range: [1, LLONG_MAX], default: 2
#
# search-min-prefix 2

# the minimum word length to stem.
# numeric, valid range: [2, UINT32_MAX], default: 4
#
# search-min-stem-len 4

# Delta used to increase positional offsets between array
# slots for multi text values.
# Can control the level of separation between phrases in different
# array slots (related to the SLOP parameter of ft.search command)"
# numeric, valid range: [1, UINT32_MAX], default: 100
#
# search-multi-text-slop 100

# Used for setting the buffer limit threshold for vector similarity tiered
# HNSW index, so that if we are using WORKERS for indexing, and the
# number of vectors waiting in the buffer to be indexed exceeds this limit,
# we insert new vectors directly into HNSW.
# numeric, valid range: [0, LLONG_MAX], default: 1024
#
# search-tiered-hnsw-buffer-limit 1024

# Query timeout.
# numeric, valid range: [1, LLONG_MAX], default: 500
#
# search-timeout 500

# minimum number of iterators in a union from which the iterator will
# will switch to heap-based implementation.
# numeric, valid range: [1, LLONG_MAX], default: 20
# switch to heap based implementation.
#
# search-union-iterator-heap 20

# The maximum memory resize for vector similarity indexes (in bytes).
# numeric, valid range: [0, UINT32_MAX], default: 0
#
# search-vss-max-resize 0

# Number of worker threads to use for query processing and background tasks.
# numeric, valid range: [0, MAX_WORKER_THREADS], default: min(MAX_WORKER_THREADS, number of CPU cores)
# This configuration also affects the number of connections per shard.
#
# search-workers 16

# The number of high priority tasks to be executed at any given time by the
# worker thread pool, before executing low priority tasks. After this number
# of high priority tasks are being executed, the worker thread pool will
# execute high and low priority tasks alternately.
# numeric, valid range: [0, LLONG_MAX], default: 1
#
# search-workers-priority-bias-threshold 1

# Load extension scoring/expansion module. Immutable.
# string, default: ""
#
# search-ext-load ""

# Path to Chinese dictionary configuration file (for Chinese tokenization). Immutable.
# string, default: ""
#
# search-friso-ini ""

# Default scorer to use for scoring documents.
# string, default: "BM25STD"
#
# search-default-scorer "BM25STD"

# Action to perform when search timeout is exceeded.
# enum, valid values: ["return", "fail", "return-strict"], default: "return"
#
# search-on-timeout return

# Action to perform when an out-of-memory state is encountered.
# enum, valid values: ["return", "fail", "ignore"], default: "return"
#
# search-on-oom return

# Set to run without memory pools.
# bool, default: no
#
# search-no-mem-pools no

# Disable garbage collection (for this process).
# bool, default: no
#
# search-no-gc no

# Enable commands filter which optimize indexing on partial hash updates.
# bool, default: no
#
# search-partial-indexed-docs no

# Disable compression for DocID inverted index. Boost CPU performance.
# bool, default: no
#
# search-raw-docid-encoding no

# Enable unstable features.
# bool, default: no
#
# search-enable-unstable-features no

# Number of search threads in the coordinator thread pool.
# numeric, valid range: [1, LLONG_MAX], default: 20
#
# search-threads 20

# Number of I/O threads in the coordinator.
# numeric, valid range: [1, 256], default: 1
#
# search-io-threads 1

# Timeout for topology validation (in milliseconds). After this timeout,
# any pending requests will be processed, even if the topology is not fully connected.
# numeric, valid range: [0, LLONG_MAX], default: 30000
#
# search-topology-validation-timeout 30000

# Maximum number of replies to accumulate before triggering `_FT.CURSOR READ`
# on the shards.
# numeric, valid range: [1, LLONG_MAX], default: 1
#
# search-cursor-reply-threshold 1

# Number of connections to each shard in the cluster. If set to 0, the number
# of connections is set to `search-workers` + 1.
# numeric, valid range: [0, UINT32_MAX], default: 0
#
# search-conn-per-shard 0

# Per-attempt timeout for inter-shard connection setup (in milliseconds). Bounds
# the TCP+TLS handshake so a blackholed SYN does not stall a connection
# indefinitely. 0 disables the timeout.
# numeric, valid range: [0, INT_MAX], default: 10000
#
# search-connect-timeout 10000

# Set the BM25STD.TANH stretch factor. This is an integer value that divides the argument
# of the tanh function that is used to normalize the score computed by the BM25STD scorer.
# numeric, valid range: [1, 10000], default: 4
#
# search-bm25std-tanh-factor 4

# The number of indexing operations to perform before yielding to allow redis be responsive while loading.
# numeric, valid range: [1, UINT32_MAX], default: 1000
#
# search-indexer-yield-every-ops 1000

# Sleep duration in microseconds during background indexing. We sleep periodically
# (every `search-bg-index-sleep-gap` iterations) to allow the main thread to acquire
# the GIL and process commands.
# numeric, valid range: [1, 999999], default: 1
#
# search-bg-index-sleep-duration-us 1

# Enable monitoring of key and field expiration (set via EXPIRE, EXPIREAT, HEXPIRE, etc.)
# for indexes. When enabled, indexes track expiration times and filter out expired
# documents and fields from search results.
# bool, default: yes
#
# search-monitor-expiration yes

# >>> BEGIN redis-gen-conf:private <<<
# Internal/advanced RediSearch configuration parameters — intentionally NOT exported to
# redis-gen.conf by `make sync-redis-conf`. Set via CLI override or by
# editing this module.conf directly when running redis-server against it.
# See the Redis repo's modules/sync-redis-conf.mk for the marker contract.

# Percentage of available memory to use for the disk write buffer.
# numeric, valid range: [0, 100], default: 20
#
# search-disk-buffer-percentage 20

# Keep numeric ranges in numeric tree parent nodes of leafs for `x` generations.
# numeric, valid range: [0, 2], default: 0
#
# search-_numeric-ranges-parents 0

# Memory limit threshold for background indexing, as a percentage.
# numeric, valid range: [0, 100], default: 100
#
# search-_bg-index-mem-pct-thr 100

# Time to pause background indexing after an out-of-memory condition.
# numeric, valid range: [0, UINT32_MAX], default: 0
#
# search-_bg-index-oom-pause-time 0

# Minimum delay before trimming can run, in milliseconds.
# numeric, valid range: [1, UINT32_MAX], default: 2000
#
# search-_min-trim-delay-ms 2000

# Maximum delay before trimming can run, in milliseconds.
# numeric, valid range: [1, UINT32_MAX], default: 5000
#
# search-_max-trim-delay-ms 5000

# Delay between trimming state checks, in milliseconds.
# numeric, valid range: [1, UINT32_MAX], default: 100
#
# search-_trimming-state-check-delay-ms 100

# Determine whether some index resources are freed on a second thread.
# bool, default: yes
#
# search-_free-resource-on-thread yes

# Enable legacy compression of double to float.
# bool, default: no
#
# search-_numeric-compress no

# Disable print of time for ft.profile. For testing only.
# bool, default: yes
#
# search-_print-profile-clock yes

# Intersection iterator orders the children iterators by their relative estimated
# number of results in ascending order, so that if we see first iterators with
# a lower count of results we will skip a larger number of results, which
# translates into faster iteration. If this flag is set, we use this
# optimization in a way where union iterators are being factorized by the number
# of their own children, so that we sort by the number of children times the
# overall estimated number of results instead.
# bool, default: no
#
# search-_prioritize-intersect-union-children no

# Simulate working under Flex conditions. For testing only. Immutable.
# bool, default: no
#
# search-_simulate-in-flex no

# Emit FT.INFO fields even when no indexes exist.
# bool, default: no
#
# search-_info-on-zero-indexes no

# Fall back to the main thread when a block client is unavailable.
# bool, default: yes
#
# search-_fallback-to-main-thread-when-block-client-unavailable yes

# <<< END redis-gen-conf:private <<<
