mitre / quaerite

Search relevance evaluation toolkit
Other
73 stars 14 forks source link

Add boost/bf as a parameterizable field #9

Closed tballison closed 5 years ago

tballison commented 5 years ago

For queries like: &boost=if(or(termfreq(type, 'cool'), termfreq(type, 'hot')), max(recip(ms(NOW/DAY, ds_field_last_modified), 3.16e-11,5,5), 0.2), 1.0)

It would be useful to be able to specify ranges, like so: &boost=if(or(termfreq(type, 'cool'), termfreq(type, 'hot')), max(recip(ms(NOW/DAY, ds_field_last_modified), 3.16e-11,{1,20},{$1}), 0.2), 1.0)

Instead of testing the pair 5,5, we could 1-20, and they would still be paired.

Or we could do: &boost=if(or(termfreq(type, 'cool'), termfreq(type, 'hot')), max(recip(ms(NOW/DAY, ds_field_last_modified), 3.16e-11,{1,20},{1,20}), 0.2), 1.0)

where they wouldn't be paired...

tballison commented 5 years ago

The initial implementation would be based on simple string substitution...no complex formula parsing.