feat: add boosting to context based search

This commit is contained in:
Michel Jonathan Schmitz
2019-04-16 15:29:13 +02:00
committed by Rainer Killinger
parent 67c814443c
commit dd4be92f90
4 changed files with 268 additions and 661 deletions

View File

@@ -178,51 +178,86 @@ const config: Partial<SCConfigFile> = {
fieldName: 'type',
},
],
boostings: [
{
factor: 1,
fields: {
'academicTerms.acronym': {
'SS 2018': 1.05,
'WS 2018/19': 1.1,
},
categories: {
'course': 1.08,
'integrated course': 1.08,
'introductory class': 1.05,
'lecture': 1.1,
'seminar': 1.01,
'tutorial': 1.05,
boostings: {
default: [
{
factor: 1,
fields: {
'academicTerms.acronym': {
'SS 2018': 1.05,
'WS 2018/19': 1.1,
},
'categories': {
'course': 1.08,
'integrated course': 1.08,
'introductory class': 1.05,
'lecture': 1.1,
'seminar': 1.01,
'tutorial': 1.05,
},
},
type: SCThingType.AcademicEvent,
},
type: SCThingType.AcademicEvent,
},
{
factor: 1.6,
type: SCThingType.Building,
},
{
factor: 1,
fields: {
'categories': {
'cafe': 1.1,
'learn': 1.1,
'library': 1.2,
'restaurant': 1.1,
},
{
factor: 1.6,
type: SCThingType.Building,
},
type: SCThingType.PointOfInterest,
},
{
factor: 1,
fields: {
'categories': {
'main dish': 2,
{
factor: 1,
fields: {
'categories': {
'cafe': 1.1,
'learn': 1.1,
'library': 1.2,
'restaurant': 1.1,
},
},
type: SCThingType.PointOfInterest,
},
type: SCThingType.Dish,
},
],
{
factor: 1,
fields: {
'categories': {
'main dish': 2,
},
},
type: SCThingType.Dish,
},
],
place: [
{
factor: 2,
type: SCThingType.Building,
},
{
factor: 2,
type: SCThingType.PointOfInterest,
},
{
factor: 2,
type: SCThingType.Room,
},
],
dining: [
{
factor: 1,
fields: {
'categories': {
'cafe': 2,
'restaurant': 2,
'canteen': 2,
'student canteen': 2,
'restroom': 1.2,
},
},
type: SCThingType.Building,
},
{
factor: 2,
type: SCThingType.Dish,
},
],
},
},
uid: 'b-tu',
};