mirror of
https://github.com/typesense/typesense.git
synced 2025-05-23 23:30:42 +08:00
No search cutoff default if exhaustive search is used.
This commit is contained in:
parent
58f3d4bf66
commit
866b5820f3
@ -559,8 +559,8 @@ Option<bool> CollectionManager::do_search(std::map<std::string, std::string>& re
|
||||
const char *PRIORITIZE_EXACT_MATCH = "prioritize_exact_match";
|
||||
const char *PRE_SEGMENTED_QUERY = "pre_segmented_query";
|
||||
|
||||
const char *EXHAUSTIVE_SEARCH = "exhaustive_search";
|
||||
const char *SEARCH_CUTOFF_MS = "search_cutoff_ms";
|
||||
const char *EXHAUSTIVE_SEARCH = "exhaustive_search";
|
||||
|
||||
if(req_params.count(NUM_TYPOS) == 0) {
|
||||
req_params[NUM_TYPOS] = "2";
|
||||
@ -671,14 +671,17 @@ Option<bool> CollectionManager::do_search(std::map<std::string, std::string>& re
|
||||
req_params[PRE_SEGMENTED_QUERY] = "false";
|
||||
}
|
||||
|
||||
if(req_params.count(EXHAUSTIVE_SEARCH) == 0) {
|
||||
req_params[EXHAUSTIVE_SEARCH] = "false";
|
||||
}
|
||||
|
||||
if(req_params.count(SEARCH_CUTOFF_MS) == 0) {
|
||||
req_params[SEARCH_CUTOFF_MS] = "2000";
|
||||
}
|
||||
|
||||
if(req_params.count(EXHAUSTIVE_SEARCH) == 0) {
|
||||
req_params[EXHAUSTIVE_SEARCH] = "false";
|
||||
} else if(req_params[EXHAUSTIVE_SEARCH] == "true") {
|
||||
// if exhaustive search is enabled, we won't enable search cut-off by default
|
||||
req_params[SEARCH_CUTOFF_MS] = "3600000";
|
||||
}
|
||||
|
||||
std::vector<std::string> query_by_weights_str;
|
||||
std::vector<size_t> query_by_weights;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user