Expr search for each field


Hi there

It would be useful to have separate expr for each field, not just for the whole query.

If we have fields like Body, Title and Url the weighting should be different.

regards Peter


you might write multiple expression and try to use field_mask ranking factor like

select id, weight() w FROM idx WHERE MATCH('test my query') OPTION ranker=expr('top(lcs)*if(field_mask==2,1,0) +  if(field_mask==0,10,0)');

there is not short-cut for now and all parts of expression will be evaluated.

Also you might try to write UDF ranker there you will get all factors and might switch expression for each field