Doubt Regarding QuerqyConfig
Closed this issue · 1 comments
shyju-t commented
I'm trying to find a better approach when there are multiple rules. Lets say I have two rules for iphone and jeans, is it better to configure querqy config like below or to have a map with search term as key and rule as value.
cons of below approach is if there are hundreds of rules, it is difficult to manage in a string.
cons of map based approaches are if there is a typo in the search term we can't get the rule from map, also if we need to append multiple rules.
val querqyConfig = QuerqyConfig.builder()
.commonRules(
CommonRulesDefinition.builder()
.rewriterId("id1")
.rules("iphone => \n SYNONYM: apple \n DOWN(50): case \n \n jeans => \n UP(5): levis")
.build(),
)
.build()
JohannesDaniel commented
Normally, users maintain rules in a file - then you can read the file and pass as string. It is planned also to support json in the future to get a better compatibility to backoffices.