Skip to main content

Search Configuration (search.conf)

This document describes the currently implemented search configuration options. If a setting is not listed here, it is not parsed by the server.


Example Configuration

<search algorithm="bm25+" default_ranking="bm25+" fuzzy="true" max_edit_distance="2"
match_mode="and" min_should_match="1" candidate_prune_multiplier="25"
highlight_start="<mark>" highlight_end="</mark>">
<params k1="1.45" b="0.68" delta="0.55" idf_smooth="1.0"
idf_floor_factor="0.05" normalize="true"
bm25_weight="0.7" tfidf_weight="0.3"
url_token_boost="1.3" url_tld_weight="0.3"
title_like_boost="1.6" tag_like_boost="1.2"
exact_match_boost="1.2" title_exact_boost="1.6"
proximity_boost_scale="1.0" proximity_boost_max="2.0" />

<scoring min_score_threshold="0.0" normalize_scores="true" score_precision="6" enable_score_explanation="false" />

<timeouts query_timeout_ms="5000" indexing_timeout_ms="30000" max_candidates="10000" min_candidates="10" />

<logging log_queries="false" log_slow_queries="true" slow_query_threshold_ms="1000"
log_scoring_details="false" log_level="1" />

<search_options track_total_hits="true" track_scores="true" explain="false" stored_fields="true"
version="false" preference="" request_cache="true"
allow_partial_search_results="true" batched_reduce_size="512" typed_keys="false" />

<performance idf_cache="true" doc_length_cache="true" avg_length_cache="true"
max_cache_size_mb="512" cache_ttl_seconds="3600" />

<limits default_limit="0" max_limit="1000" min_limit="1" default_offset="0" max_offset="100000" />

<recency_decay enabled="true" decay_model="exponential" base_weight="1.0" max_boost="2.0"
half_life_days="30" decay_rate="0.0231" sigmoid_steepness="0.1"
sigmoid_center="30" power_exponent="1.5" gaussian_mean="0.0"
gaussian_stddev="30" min_decay_factor="0.1" use_timestamp_field="true"
normalize_by_collection="false" query_dependent="false" />
</search>

<search> Attributes

  • algorithm: bm25, bm25+, tfidf, hybrid
  • default_ranking: same values as algorithm
  • fuzzy: enable fuzzy matching (true/false)
  • max_edit_distance: maximum edit distance for fuzzy matching
  • match_mode: lexical term matching strategy: and, or, or min_should_match
  • min_should_match: minimum matched query terms when match_mode="min_should_match"
  • candidate_prune_multiplier: pre-score candidate cap as limit * multiplier; 0 disables pruning
  • highlight_start, highlight_end: highlight tag wrappers

<params> Ranking Parameters

  • k1 (default 1.2)
  • b (default 0.75)
  • delta (default 1.0)
  • idf_smooth (default 1.0)
  • idf_floor_factor (default 0.05)
  • normalize (default true)
  • bm25_weight (default 0.7)
  • tfidf_weight (default 0.3)
  • url_token_boost (default 1.3)
  • url_tld_weight (default 0.3)
  • title_like_boost (default 1.6)
  • tag_like_boost (default 1.2)
  • exact_match_boost (default 1.2)
  • title_exact_boost (default 1.6)
  • proximity_boost_scale (default 1.0)
  • proximity_boost_max (default 2.0)

<scoring>

  • min_score_threshold (default 0.0)
  • normalize_scores (default true)
  • score_precision (default 6)
  • enable_score_explanation (default false)

<timeouts>

  • query_timeout_ms (default 5000)
  • indexing_timeout_ms (default 30000)
  • max_candidates (default 10000)
  • min_candidates (default 10)

<logging>

  • log_queries (default false)
  • log_slow_queries (default true)
  • slow_query_threshold_ms (default 1000)
  • log_scoring_details (default false)
  • log_level (default 1, 0=none, 1=errors, 2=warnings, 3=all)

<search_options>

  • track_total_hits (default true)
  • track_scores (default true)
  • explain (default false)
  • stored_fields (default true)
  • version (default false)
  • preference (default empty)
  • request_cache (default true)
  • allow_partial_search_results (default true)
  • batched_reduce_size (default 512)
  • typed_keys (default false)

<performance>

  • idf_cache (default true)
  • doc_length_cache (default true)
  • avg_length_cache (default true)
  • max_cache_size_mb (default 512)
  • cache_ttl_seconds (default 3600)

<limits>

  • default_limit (default 0, unlimited)
  • max_limit (default 1000)
  • min_limit (default 1)
  • default_offset (default 0)
  • max_offset (default 100000)

<recency_decay>

  • enabled (default true)
  • decay_model (default exponential)
  • base_weight (default 1.0)
  • max_boost (default 2.0)
  • half_life_days (default 30)
  • decay_rate (default 0.0231)
  • sigmoid_steepness (default 0.1)
  • sigmoid_center (default 30)
  • power_exponent (default 1.5)
  • gaussian_mean (default 0.0)
  • gaussian_stddev (default 30)
  • min_decay_factor (default 0.1)
  • use_timestamp_field (default true)
  • normalize_by_collection (default false)
  • query_dependent (default false)