AI-API - Search Tuning for one call (embed_and_search)

AI API: Vectors, Images & LLM

embed_and_search ranks with the Search Tuning saved for your index. Each parameter below changes one setting for that call only. The saved settings do not change, and the hosted search page keeps using them.

01 · The parameters

Add them to an embed_and_search call. The default is what an index uses until you change it in the panel.

ParameterSetting in the panelValuesDefault
lexical_weightSemantic ↔ Lexical BalanceFrom 0.10 (meaning leads) to 1.00 (only the words decide)0.15
fw_title
fw_description
fw_uri
fw_text
fw_text_t
Field Weights: Title, Description, URI, Text, LD TextA number, 0.01 or more; only how they compare matters0.20
0.05
0.01
0.01
0.01
mmMinimum Matchflexible, balanced, strict, or your own rule such as 75% or 2<90% 5<75%flexible
search_modeSearch Modeunion, keywords_required, meaning_required, intersectionunion
vector_topkVector Candidate PoolFrom 10 to 1000500
quality_boostContent Quality BoostFrom 0 (off) to 10
fresh_biasFresh Results Bias, the Fresh switch of the hosted page1 turns it on for the call, 0 turns it off. On, newer documents rank higher and undated ones are left out, with the index's Fresh Results Bias Weight.off
freshness_boostnot in the panelThe window of fresh=yes, in days7

A number setting sent with something that is not a number, or a search_mode that is not one of the four above, is ignored, and the saved setting applies. Lexical Only is a setting of the panel and cannot be chosen per call.

02 · Example

curl -s -G https://api.opensolr.com/solr_manager/api/embed_and_search \
  --data-urlencode "email=YOUR_EMAIL" \
  --data-urlencode "api_key=YOUR_API_KEY" \
  --data-urlencode "index_name=YOUR_INDEX" \
  --data-urlencode "q=thermal camera for walls" \
  --data-urlencode "fresh=no" \
  --data-urlencode "search_mode=keywords_required" \
  --data-urlencode "mm=strict" \
  --data-urlencode "fw_title=0.5"

The debug part of the answer shows the search mode and the vector pool the call used, and params shows the rest.

03 · Related

The call itself, its answer and its errors: embed_and_search.

What each setting does, in plain words: Search Tuning.