if (typeof(globalconfig) === 'undefined') { var globalconfig = {}; } globalconfig.language = {"current": "FR" }; globalconfig.countries={"AE":{"code":"AE","labels":{"de":"Vereinigte Arabische Emirate","en":"United Arab Emirates","ja":"アラブ首長国連邦","nl":"Verenigde Arabische Emiraten","pl":"Zjednoczone Emiraty Arabskie","ru":"ОАЭ ","zh":"阿联酋"},"languages":["en"],"name":"United Arab Emirates"},"AT":{"code":"AT","labels":{"de":"Österreich","en":"Austria","it":"Austria ITA","ja":"オーストリア","nl":"Oostenrijk","pl":"Austria","ru":"Австрия ","zh":"奥地利"},"languages":["de","en"],"name":"Austria"},"BE":{"code":"BE","labels":{"de":"Belgien","en":"Belgium","ja":"ベルギー","nl":"België","pl":"Belgia","ru":"Бельгия ","zh":"比利时"},"languages":["en"],"name":"Belgium"},"BH":{"code":"BH","labels":{"de":"Bahrain","en":"Bahrain","ja":"バーレーン","nl":"Bahrein","pl":"Bahrajn","ru":"Бахрейн ","zh":"巴林"},"languages":["en"],"name":"Bahrain"},"BR":{"code":"BR","labels":{"de":"Brasilien","en":"Brazil","ja":"ブラジル","nl":"Brazilië","pl":"Brazylia","ru":"Бразилия ","zh":"巴西"},"languages":["en"],"name":"Brazil"},"CA":{"code":"CA","labels":{"de":"Kanada","en":"Canada","ja":"カナダ","nl":"Canada","pl":"Kanada","ru":"Канада ","zh":"加拿大"},"languages":["en","fr"],"name":"Canada"},"CH":{"code":"CH","labels":{"de":"Schweiz","en":"Switzerland","ja":"スイス","nl":"Zwisterland","pl":"Szwajcaria","ru":"Швейцария ","zh":"瑞士"},"languages":["de","en"],"name":"Switzerland"},"CN":{"code":"CN","labels":{"de":"China","en":"Greater China","fr":"Chine","ja":"中国","nl":"China","pl":"Chiny","ru":"Китай ","xx":"","zh":"中国"},"languages":["en","zh"],"name":"Chine","name_en":"Greater China"},"CZ":{"code":"CZ","labels":{"de":"Tschechische Republik","en":"Czech Republic","ja":"チェコ","nl":"Tsjechië","pl":"Czechy","ru":"Чехия","zh":"捷克"},"languages":["en"],"name":"Czech Republic"},"DE":{"code":"DE","labels":{"de":"Deutschland","en":"Germany","fr":"Allemagne","ja":"ドイツ","nl":"Duitsland","pl":"Niemcy","ru":"Германия ","xx":"","zh":"德国"},"languages":["de","en"],"name":"Allemagne","name_en":"Germany"},"ES":{"code":"ES","labels":{"de":"Spanien","en":"Spain","ja":"スペイン","nl":"Spanje","pl":"Hiszpania","ru":"Испания ","zh":"西班牙"},"languages":["en"],"name":"Spain"},"FR":{"code":"FR","labels":{"de":"Frankreich","en":"France","fr":"France","it":"Italy","ja":"フランス","nl":"Frankfrijk","pl":"Francja","ro":"France","ru":"Франция ","sv":"France","xx":"","zh":"法国"},"languages":["en","fr"],"name":"France"},"GB":{"code":"GB","labels":{"de":"Großbritannien","en":"United Kingdom","ja":"イギリス","nl":"Groot-Brittanie","pl":"Zjednoczone Królestwo","ru":"Великобритания ","zh":"英国"},"languages":["en"],"name":"United Kingdom"},"HK":{"code":"HK","labels":{"de":"Hongkong","en":"Hong Kong","nl":"Hong Kong","pl":"Hong Kong","zh":"Hongkong"},"languages":["en","zh"],"name":"Hong Kong"},"HR":{"code":"HR","labels":{"de":"Kroatien","en":"Croatia","ja":"クロアチア","nl":"Kroatië","pl":"Chorwacja","ru":"Хорватия","zh":"克罗地亚"},"languages":["en"],"name":"Croatia"},"HU":{"code":"HU","labels":{"de":"Ungarn","en":"Hungary","ja":"ハンガリー","nl":"Hongarije","pl":"Węgry","ru":"Венгрия ","zh":"匈牙利"},"languages":["en"],"name":"Hungary"},"ID":{"code":"ID","labels":{"de":"Indonesien","en":"Indonesia","ja":"インドネシア","nl":"Indonesië","pl":"Indonezja","ru":"Индонезия ","zh":"印度尼西亚"},"languages":["en"],"name":"Indonesia"},"IN":{"code":"IN","labels":{"de":"Indien","en":"India","ja":"インド","nl":"India","pl":"Indie","ru":"Индия ","zh":"印度"},"languages":["en"],"name":"India"},"IT":{"code":"IT","labels":{"de":"Italien","en":"Italy","ja":"イタリア","nl":"Italië","pl":"Włochy","ru":"Италия","zh":"意大利"},"languages":["en","it"],"name":"Italy"},"JP":{"code":"JP","labels":{"de":"Japan","en":"Japan","ja":"日本","nl":"Japan","pl":"Japonia","ru":"Япония","zh":"日本"},"languages":["ja","en"],"name":"Japan"},"KR":{"code":"KR","labels":{"de":"Südkorea","en":"South Korea","ja":"韓国","nl":"Zuid-Korea","pl":"Korea Południowa","ru":"Южная Корея ","zh":"韩国"},"languages":["en"],"name":"South Korea"},"LB":{"code":"LB","labels":{"de":"Libanon","en":"Lebanon","ja":"レバノン","nl":"Libanon","pl":"Liban","ru":"Ливан","zh":"黎巴嫩"},"languages":["en"],"name":"Lebanon"},"MA":{"code":"MA","labels":{"de":"Marokko","en":"Morocco","ja":"モロッコ","nl":"Marokko","pl":"Maroko","ru":"Марокко","zh":"摩洛哥"},"languages":["en"],"name":"Morocco"},"MM":{"code":"MM","labels":{"de":"Myanmar","en":"Myanmar","ja":"ミャンマー","nl":"Myanmar","pl":"Mjanma","ru":"Мьянма","zh":"缅甸"},"languages":["en"],"name":"Myanmar"},"MY":{"code":"MY","labels":{"de":"Malaysia","en":"Malaysia","ja":"マレーシア","nl":"Maleisië","pl":"Malezja","ru":"Малайзия","zh":"马来西亚"},"languages":["en"],"name":"Malaysia"},"NG":{"code":"NG","labels":{"de":"Nigeria","en":"Nigeria","pl":"Nigeria"},"languages":["en"],"name":"Nigeria"},"NL":{"code":"NL","labels":{"de":"Niederlande","en":"Netherlands","ja":"オランダ","nl":"Nederland","pl":"Holandia","ru":"Нидерланды","zh":"荷兰"},"languages":["en","nl"],"name":"Netherlands"},"PL":{"code":"PL","labels":{"de":"Polen","en":"Poland","ja":"ポーランド","nl":"Polen","pl":"Polska","ru":"Польша ","zh":"波兰"},"languages":["en","pl"],"name":"Poland"},"PT":{"code":"PT","labels":{"de":"Portugal","en":"Portugal","ja":"ポルトガル","nl":"Portugal","pl":"Portugalia","ru":"Португалия","zh":"葡萄牙"},"languages":["en"],"name":"Portugal"},"RO":{"code":"RO","labels":{"de":"Rumänien","en":"Romania","ja":"ルーマニア","nl":"Roemenië","pl":"Rumunia","ru":"Румыния ","zh":"罗马尼亚"},"languages":["en","ro"],"name":"Romania"},"RU":{"code":"RU","labels":{"de":"Russland","en":"Russia","fr":"Russie","ja":"ロシア","nl":"Rusland","pl":"Rosja","ru":"Россия ","xx":"??????","zh":"俄罗斯"},"languages":["ru","en"],"name":"Russie","name_en":"Russia"},"SE":{"code":"SE","labels":{"de":"Schweden","en":"Sweden","ja":"スウェーデン","nl":"Zweden","pl":"Szwecja","ru":"Швеция","sv":"Sverige","zh":"瑞典"},"languages":["sv","en"],"name":"Sweden"},"SG":{"code":"SG","labels":{"de":"Singapur","en":"Singapore","ja":"シンガポール","nl":"Singapore","pl":"Singapur","ru":"Сингапур ","zh":"新加坡"},"languages":["en"],"name":"Singapore"},"TH":{"code":"TH","labels":{"de":"Thailand","en":"Thailand","ja":"タイ","nl":"Thailand","pl":"Tajlandia","ru":"Таиланд ","zh":"泰国"},"languages":["en"],"name":"Thailand"},"TW":{"code":"TW","labels":{"de":"Taiwan","en":"Taiwan","ja":"台湾","nl":"Taiwan","pl":"Tajwan","zh":""},"languages":["en"],"name":"Taiwan"},"UA":{"code":"UA","labels":{"de":"Ukraine","en":"Ukraine","ja":"ウクライナ","nl":"Oekraïne","pl":"Ukraina","ru":"Украина ","zh":"乌克兰"},"languages":["en"],"name":"Ukraine"},"US":{"code":"US","labels":{"de":"USA","en":"USA","ja":"アメリカ","nl":"Verenigde Staten","pl":"Stany Zjednoczone","ru":"США","zh":"美国"},"languages":["en"],"name":"USA"},"WLD":{"code":"WLD","labels":{"en":"International"},"name":"International"}}; if (typeof(globalconfig) === 'undefined') { var globalconfig = {}; } globalconfig.elastic = globalconfig.elastic || {}; globalconfig.elastic.lang = "EN"; globalconfig.elastic.connection = function() { return { host: { protocol: location.protocol, host: 'www.rolandberger.com', port: 443, path: '/search' }, apiVersion: '2.2', log: 'info' } }; globalconfig.i18n = globalconfig.i18n || {}; globalconfig.i18n.topjob = "Top Job" globalconfig.i18n.topjob_description = "" globalconfig.elastic.filterSettings = {}; globalconfig.elastic.commonSettings = {}; globalconfig.elastic.commonSettings.source = { includes: ['snippets.*','categories.*'], excludes: ['snippets.body'] } globalconfig.elastic.commonSettings.queryFields = ['_all', 'keywords^5', 'headline^5']; globalconfig.elastic.commonSettings.defaultFilterByUserSettingsFunction = function (aggregationController, useENCountryName) { useENCountryName = useENCountryName || false; var fieldName = aggregationController.countryFieldName; var returnValue = {}; returnValue[fieldName] = "France"; var countryCode = aggregationController.userSettings.countryCode; if ('WLD' === countryCode) { return returnValue; } if (countryCode && globalconfig && globalconfig.countries) { var country = globalconfig.countries[countryCode]; if (country) { returnValue[fieldName] = country.name; if (useENCountryName) { returnValue[fieldName] = country.labels.en; } } else { // do nothing return default returnValue; } } else { // do nothing return default returnValue; } return returnValue; } globalconfig.elastic.commonSettings.defaultIndex = 'rbcms_fr'; globalconfig.elastic.commonSettings.defaultFilterByUserSettingsIgnoreGlobalFunction = function (aggregationController) { if ( (!aggregationController.userSettings.countryCode) || 'WLD' == aggregationController.userSettings.countryCode ) { return null; } else { return globalconfig.elastic.commonSettings.defaultFilterByUserSettingsFunction(aggregationController); } } globalconfig.elastic.commonSettings.defaultFilterForJobAndJoinFunction = function (aggregationController) { if ( (!aggregationController.userSettings.countryCode) || 'WLD' == aggregationController.userSettings.countryCode ) { return null; } else { return globalconfig.elastic.commonSettings.defaultFilterByUserSettingsFunction(aggregationController, false); } } globalconfig.elastic.filterSettings.jobpostings = { index:'join', type:'jobpostings', source: {includes: "*", excludes: []}, defaultFilter: globalconfig.elastic.commonSettings.defaultFilterForJobAndJoinFunction, sort:[ {field:'priority',order:'desc'}, {field:'positionProfile.metaDescriptions.categorization alternativejobtitle'} ], countryFieldName: 'countries.FR', filters: [ { name: 'Country', field: 'countries.FR', aggregationMinDocCount:0, uitype: 'selectbox', orderByTerm: true }, { name: 'Career Level', items: ['Consulting – Experienced Hire','Consulting – Graduate Hire', 'Consulting – Internship','Consulting – MBA Positions', 'Non-Consulting – Experienced Hire', 'Non-Consulting – Graduate Hire','Non-Consulting – Internship'], orderItems: ['topjob'].concat(['Consulting – Experienced Hire','Consulting – Graduate Hire', 'Consulting – Internship','Consulting – MBA Positions', 'Non-Consulting – Experienced Hire', 'Non-Consulting – Graduate Hire','Non-Consulting – Internship']), field: 'audiences.FR', aggregationMinDocCount:0, uitype: 'selectbox'} ] }; globalconfig.elastic.filterSettings.quicksearch = JSON.parse(JSON.stringify(globalconfig.elastic.filterSettings.jobpostings)); globalconfig.elastic.filterSettings.quicksearch.defaultFilter = null; globalconfig.elastic.filterSettings.quicksearch.filters[0].noselection= 'All'; globalconfig.elastic.filterSettings.quicksearch.filters[1].noselection= 'All'; globalconfig.elastic.filterSettings.eventpostings = { index:'join', type:'eventpostings', source: {includes: "*", excludes: []}, defaultFilter: globalconfig.elastic.commonSettings.defaultFilterForJobAndJoinFunction, countryFieldName: 'countries.FR', filters: [ {name: 'Country', field: 'countries.FR', uitype: 'selectbox'} ] }; globalconfig.elastic.filterSettings.eventpostingsDropdown = JSON.parse(JSON.stringify(globalconfig.elastic.filterSettings.eventpostings)); globalconfig.elastic.filterSettings.eventpostingsDropdown.defaultFilter = null; globalconfig.elastic.filterSettings.social = { index:'socialmedia', type:'', source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_fbmain = { index:'socialmedia', type:'', query:{required: {"mustNot": {"channel": "join"}}}, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_fbjoin = { index:'socialmedia', type:'', query:{required: {"mustNot": {"channel": "main"}}}, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_unoriginal_exclude = { index:'socialmedia', type:'', query:{required: {"mustNot": {"originalContent": "false"}}}, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_unoriginal_exclude_fbmain = { index:'socialmedia', type:'', query:{required: {"mustNot": {"channel": "join", "originalContent": "false"}}}, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_unoriginal_exclude_fbjoin = { index:'socialmedia', type:'', query:{required: {"mustNot": {"channel": "main", "originalContent": "false"}} }, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_mostRecent = { index:'socialmedia', type:'', query:{required:{ "should": {"mostRecent":true}}}, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_fbmain_mostRecent = { index:'socialmedia', type:'', query:{required: {"mustNot": {"channel": "join"},"should": {"mostRecent":true}}}, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_fbjoin_mostRecent = { index:'socialmedia', type:'', query:{required: {"mustNot": {"channel": "main"},"should": {"mostRecent":true}}}, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_unoriginal_exclude_mostRecent = { index:'socialmedia', type:'', query:{required: {"mustNot": {"originalContent": "false"},"should": {"mostRecent":true}}}, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_unoriginal_exclude_fbmain_mostRecent = { index:'socialmedia', type:'', query:{required: {"mustNot": {"channel": "join", "originalContent": "false"},"should": {"mostRecent":true}}}, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.social_unoriginal_exclude_fbjoin_mostRecent = { index:'socialmedia', type:'', query:{required: {"mustNot": {"channel": "main", "originalContent": "false"},"should": {"mostRecent":true}} }, source: {includes: "*", excludes: []}, sort:'publishingDate', order:'desc', filters: [ ] }; globalconfig.elastic.filterSettings.press = { index:'rbcms_fr', type:'press', query:{}, sort:'date', order:'desc', defaultFilter: function(aggregationController) { if ('DE' == aggregationController.userSettings.countryCode) { return {"categories.country": "France"}; } else { return globalconfig.elastic.commonSettings.defaultFilterByUserSettingsFunction(aggregationController); } }, filters: [ {name: 'Date Range', field:'date', aggtype:'date_histogram', uitype:'daterange'}, {name: 'Topic', field: 'categories.topic', orderByTerm: true}, {name: 'Country', field: 'categories.country', orderByTerm: true, orderItems:['Global']}, {name: 'Solutions', field: 'categories.solutions', orderByTerm: true}, {name: 'Office', field: 'categories.office', orderByTerm: true}, {name: 'Category', field: 'categories.category', orderByTerm: true} ] }; globalconfig.elastic.filterSettings.blog_list = { index:'rbcms_fr', type:'blog', query:{}, sort:'date', order:'desc', filters: [ {name: 'Date Range', field:'date', aggtype:'date_histogram', uitype:'daterange'} ] }; globalconfig.elastic.filterSettings.default = { index:'rbcms_fr', type:'publication,person,press,blog,page,dossier,solution', query:{ queryWrapper: function(ejs, query, filterData, queryModel) { var functionQuery = ejs.FunctionScoreQuery(); functionQuery.query(query); var theFunction = ejs.DecayScoreFunction('date'); theFunction.exp(); theFunction.scale("365d"); theFunction.offset("182d"); functionQuery.function(theFunction); return functionQuery; } }, filters: [ {name: 'Type', field: '_type'}, {name: 'Solutions', field: 'categories.solutions', orderByTerm: true}, {name: 'Country', field: 'categories.country', orderByTerm: true, orderItems:['Global']}, {name: 'Region', field: 'categories.region', orderByTerm: true}, {name: 'Office', field: 'categories.office', orderByTerm: true}, {name: 'Category', field: 'categories.category', orderByTerm: true} ] }; globalconfig.elastic.filterSettings.publication = { index:'rbcms_fr', type:'publication', sort:'date', order:'desc', defaultFilter: {"categories.country": "France"}, filters: [ {name: 'Solutions', field: 'categories.solutions', orderByTerm: true}, {name: 'Category', field: 'categories.category', orderByTerm: true}, {name: 'Country', field: 'categories.country', orderByTerm: true, orderItems:['Global']}, {name: 'Region', field: 'categories.region', orderByTerm: true}, {name: 'Office', field: 'categories.office', orderByTerm: true}, {name: 'Date Range', field:'date', aggtype:'date_histogram', uitype:'daterange'} ] }; globalconfig.elastic.filterSettings.partner = { index:'rbcms_fr', type:'person', sort:'lastName_sort', order:'asc', query: { required: { "should": { "position.partner":true, "position.senior_partner":true } }, }, filters: [ {name: 'Solutions', field: 'categories.solutions', orderByTerm: true}, {name: 'Country', field: 'categories.country', orderByTerm: true} ] }; globalconfig.elastic.filterSettings.experts = { index:'rbcms_fr', type:'person', sort:'lastName_sort', order:'asc', query: { required: { "should": { "position.senior_partner":true, "position.partner":true, "position.principal":true } }, }, filters: [ {name: 'Solutions', field: 'categories.solutions', orderByTerm: true}, {name: 'Country', field: 'categories.country', orderByTerm: true} ] }; globalconfig.elastic.filterSettings.experts_by_solution = { index:'rbcms_fr', type:'person', sort:[ {field:'_score', order:'desc'} ,{field:'lastName_sort', order: 'asc'} ], query:{ queryWrapper: function(ejs, query, filterData, queryModel) { var functionQuery = ejs.FunctionScoreQuery(); var filter = ejs.BoolFilter(); filter.should(ejs.TermFilter("position.senior_partner",true)); filter.should(ejs.TermFilter("position.partner",true)); filter.should(ejs.TermFilter("position.principal",true)); filter.should(ejs.TermFilter("position.manager",true)); filter.should(ejs.TermFilter("position.expert",true)); var query = ejs.FilteredQuery(query, filter); functionQuery.query(query); // BOOSTING // Senior Partner, Partner, Principal, Manager, Expert var levels = ['senior_partner','partner', 'principal', 'manager', 'expert']; for(var j = 0, i = levels.length; i>0; i--, j++) { var level = levels[j]; var scoreFunction= ejs.BoostFactorScoreFunction(); var scoreFunctionFilter1 = ejs.TermFilter("position." + level,true); scoreFunction.boost(i * 10); scoreFunction.filter(scoreFunctionFilter1); functionQuery.function(scoreFunction); } functionQuery.boost(5); functionQuery.boostMode("replace"); functionQuery.scoreMode("max"); functionQuery.minScore(1); return functionQuery; } }, filters: [ { name: 'Solutions', field: 'categories.solutions', orderByTerm: true}, { name: 'Country', field: 'categories.country', orderByTerm: true} ], defaultFilter: function(aggregationController) { var returnValue = globalconfig.elastic.commonSettings.defaultFilterByUserSettingsIgnoreGlobalFunction(aggregationController); if (aggregationController.$attrs && aggregationController.$attrs.mFilterSolutions) { if (returnValue == null) { returnValue = {}; } returnValue["categories.solutions"] = aggregationController.$attrs.mFilterSolutions; } return returnValue; } }; globalconfig.elastic.filterSettings.hr_contacts = { index:'rbcms_fr', type:'person', defaultFilter: globalconfig.elastic.commonSettings.defaultFilterByUserSettingsIgnoreGlobalFunction, sort:'lastName_sort', order:'asc', groupBy: 'categories.position description', groupByItems: ['HR contact, Full-time Positions Consulting', 'HR contact, Internship Positions Consulting'], query: { required: { "should": { "position.hr_contact":true } } }, filters: [ {name: 'Country', field: 'categories.country', uitype: 'selectbox', orderByTerm: true}, ] }; globalconfig.elastic.filterSettings.press_contacts = { index:'rbcms_fr', type:'person', defaultFilter: globalconfig.elastic.commonSettings.defaultFilterByUserSettingsIgnoreGlobalFunction, sort:[ {field:'_score', order:'desc'}, {name: 'Country', field: 'categories.country', uitype: 'selectbox', orderByTerm: true}, {field:'lastName_sort', order: 'asc'} ], query:{ queryWrapper: function(ejs, query, filterData, queryModel) { var functionQuery = ejs.FunctionScoreQuery(); var filter = ejs.BoolFilter(); filter.should(ejs.TermFilter("position.press_contact",true)); var query = ejs.FilteredQuery(query, filter); functionQuery.query(query); // BOOSTING // Press contacts based on title var levels = [ 'Head of Global Marketing & Communications', 'Head of Global Newsroom', 'Head of Marketing & Communications Germany, Austria and Switzerland', 'Head of Global Media Relations and Press', 'Head of Regional Marketing & PR Southern Europe', 'Marketing Advisor & Press Contact', 'Press contact Global PR', 'Press contact Austria', 'Press contact Belgium', 'Press contact Greater China', 'Press contact Japan', 'Press contact Netherlands', 'Press contact South East Asia', 'Press contact Switzerland', 'HR contact USA / Press contact USA', 'Press contact']; for(var j = 0, i = levels.length; i>0; i--, j++) { var level = levels[j]; console.log(level); console.log(ejs.TermFilter("categories.position")); console.log(ejs.TermFilter("categories.position",level)); var scoreFunction= ejs.BoostFactorScoreFunction(); var scoreFunctionFilter1 = ejs.TermFilter("categories.position",level); scoreFunction.boost(i * 10); scoreFunction.filter(scoreFunctionFilter1); functionQuery.function(scoreFunction); } functionQuery.boost(5); functionQuery.boostMode("replace"); functionQuery.scoreMode("max"); functionQuery.minScore(1); return functionQuery; }, required: { "should": { "position.press_contact":true } } }, filters: [ {name: 'Country', field: 'categories.country', uitype: 'selectbox', orderByTerm: true}, ] }; globalconfig.elastic.filterSettings.dossier = { index:'rbcms_fr', type:'dossier', sort:'date', order:'desc', filters: [] };