Yea, I agree. Though its tricky to expose this functionality nicely... .
Basically, on the indexing side, there is a possibility to control the
weighting of a term for example by adding a payload to it that represent the
score. And then, when searching, using a custom query that takes those
payloads and adds them to the scoring. This means that when indexing, you
will need to provide the weighting (or just the special ones), for example:
"the women^2 went to the beach". This does mean that for each document you
want to change the term weights, it will need to be indexed with a new
value(s), for example: "the women^1.5 went to the beach^2". That format (^)
denoting custom weight is something I invented here for the example. Then,
when searching, those weights will be taken into account using a special
custom_weight query that will be created for it. Does that sound like
something that will help you?
On Fri, Sep 10, 2010 at 5:00 PM, Mykhailo Korbakov firstname.lastname@example.org:
Oh I wish that this weird trick would be my wish
I can come up with solution for few of these corrected weights, but
unfortunately there's a plan for thousands of them.
Don't you think that term weight access (both TF and IDF parts) can be
useful in ES? Having some way to modify IDF weights is really useful for
advanced ranking algorithms with implicit feedback processing. As for now we
have to pass terms weights specified in queries and it doesn't very
May be it is worth to open an issue in GitHub?
On Fri, Sep 10, 2010 at 4:42 PM, Shay Banon email@example.com:
No, you can't do that. But you can control it on the search aspect, by
constructing a boosted query and filtered by specific docs. This solution
really depends on the number of custom weights you wish to set though... .
On Fri, Sep 10, 2010 at 4:39 PM, Mykhailo Korbakov firstname.lastname@example.org:
Unfortunately it's not my case.
My goal is to make changes like this: "set weight of term 'woman' in
document with id 1231231231 to 1.5". I don't think that it's possible with
custom_score, or at least I'm missing something important about it.
On Fri, Sep 10, 2010 at 4:21 PM, Shay Banon <
It really depends on what exactly you are after, but custom_score query
might help here:
On Fri, Sep 10, 2010 at 1:57 AM, rmihael email@example.com wrote:
Is there any way to change term weight in the context of one
particular document? Or, other words, to change TF value of specific
term for specific document?
I need this trick to promote specific documents in the context of
predefined queries. May be there's some better way to achieve it? I
just can think any other then TF manipulation.
Thank you in advance,
-- Michael Korbakov