Now with search on presenter's name and email
This commit is contained in:
@@ -355,18 +355,22 @@ async function handle_search__event_session(
|
||||
api_cfg,
|
||||
event_id,
|
||||
fulltext_search_qry_str,
|
||||
ft_presenter_search_qry_str,
|
||||
like_search_qry_str=null,
|
||||
// session_type_code=null,
|
||||
like_presenter_search_qry_str=null,
|
||||
params={},
|
||||
try_cache=true
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_id: any,
|
||||
fulltext_search_qry_str: any,
|
||||
like_search_qry_str: any,
|
||||
// session_type_code: any,
|
||||
fulltext_search_qry_str: null|string,
|
||||
ft_presenter_search_qry_str: null|string,
|
||||
like_search_qry_str: null|string,
|
||||
like_presenter_search_qry_str: null|string,
|
||||
params: any,
|
||||
try_cache: boolean
|
||||
try_cache: boolean,
|
||||
log_lvl: null|number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_search__event_session() *** event_id=${event_id}`);
|
||||
@@ -383,16 +387,37 @@ async function handle_search__event_session(
|
||||
return false; // Returning false instead of [] because no search was performed.
|
||||
}
|
||||
|
||||
if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) {
|
||||
params_json['ft_qry'] = {
|
||||
'default_qry_str': fulltext_search_qry_str,
|
||||
};
|
||||
if (fulltext_search_qry_str || ft_presenter_search_qry_str) {
|
||||
params_json['ft_qry'] = {};
|
||||
if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) {
|
||||
params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str;
|
||||
}
|
||||
|
||||
if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2) {
|
||||
params_json['ft_qry']['event_presenter_li_qry_str'] = ft_presenter_search_qry_str;
|
||||
}
|
||||
}
|
||||
|
||||
if (like_search_qry_str && like_search_qry_str.length > 2) {
|
||||
params_json['and_like'] = {
|
||||
'default_qry_str': like_search_qry_str,
|
||||
};
|
||||
// Use the AND (AND LIKE) query
|
||||
// if (like_search_qry_str || like_presenter_search_qry_str) {
|
||||
// params_json['and_like'] = {};
|
||||
// if (like_search_qry_str && like_search_qry_str.length > 2) {
|
||||
// params_json['and_like']['default_qry_str'] = like_search_qry_str;
|
||||
// }
|
||||
// if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) {
|
||||
// params_json['and_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str;
|
||||
// }
|
||||
// }
|
||||
|
||||
// Use the AND (OR LIKE) query
|
||||
if (like_search_qry_str || like_presenter_search_qry_str) {
|
||||
params_json['or_like'] = {};
|
||||
if (like_search_qry_str && like_search_qry_str.length > 2) {
|
||||
params_json['or_like']['default_qry_str'] = like_search_qry_str;
|
||||
}
|
||||
if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) {
|
||||
params_json['or_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str;
|
||||
}
|
||||
}
|
||||
|
||||
params_json['and_qry'] = {};
|
||||
@@ -408,15 +433,16 @@ async function handle_search__event_session(
|
||||
obj_type: 'event_session',
|
||||
for_obj_type: 'event',
|
||||
for_obj_id: event_id,
|
||||
use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config.
|
||||
use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value
|
||||
use_alt_table: true, // NOTE: We want to use the alt table for session searching
|
||||
use_alt_base: false,
|
||||
enabled: enabled,
|
||||
hidden: hidden,
|
||||
order_by_li: order_by_li,
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
params_json: params_json,
|
||||
params: params
|
||||
params: params,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
.then(function (event_session_obj_li_get_result) {
|
||||
if (event_session_obj_li_get_result) {
|
||||
@@ -831,7 +857,8 @@ async function handle_search__event_badge(
|
||||
like_search_qry_str=null,
|
||||
external_event_id,
|
||||
params={},
|
||||
try_cache=true
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_id: any,
|
||||
@@ -840,7 +867,8 @@ async function handle_search__event_badge(
|
||||
like_search_qry_str: any,
|
||||
external_event_id: any,
|
||||
params: any,
|
||||
try_cache: boolean
|
||||
try_cache: boolean,
|
||||
log_lvl: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_search__event_badge() *** event_id=${event_id}`);
|
||||
@@ -911,7 +939,7 @@ async function handle_search__event_badge(
|
||||
offset: offset,
|
||||
params_json: params_json,
|
||||
params: params,
|
||||
log_lvl: 1
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
.then(function (badge_obj_li_get_result) {
|
||||
// console.log('Badge list:', badge_obj_li_get_result);
|
||||
|
||||
Reference in New Issue
Block a user