Skip to content

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Mar 2, 2016

This changes the _all field to store per-field boosts using a single byte
similarly to norms.

For some reason I could not regenerate the bw indices for beta and rc
releases. I still need to look into it.

@jpountz jpountz added >enhancement review :Search/Search Search-related issues that do not fall into other categories v5.0.0-alpha1 labels Mar 2, 2016
@jimczi
Copy link
Contributor

jimczi commented Mar 2, 2016

The loss in precision should not affect every user but we should add a small note in the migration docs, don't you think ?

@jpountz
Copy link
Contributor Author

jpountz commented Mar 2, 2016

Good point, will do!

@jpountz
Copy link
Contributor Author

jpountz commented Mar 2, 2016

@jimferenczi I pushed a new commit.

@jimczi
Copy link
Contributor

jimczi commented Mar 2, 2016

I don't think we should encode a boost value directly. We've started to change index time boost into query time boost in the other field types so I guess it would be nice to have some sort of query time boost in the _all field as well. For instance we could encode the class of score this payload refers to and change the score of each class at query time.

PUT test
{
    "mappings": {
        "type1": {
            "properties": {
                "title": {
                    "type": "string",
                    "boost": 1
                }
            }
        }
    }
}

The boost value is an integer (or a short or even a byte but the key point is to have small numbers so that we can use vint to encode the payload) that refers to the first class score. At query time we could remap the payloads with a value of 1 to any float value we want.

@jpountz I am not saying that we should not merge this PR but other solutions that would let the user change the boost for _all fields at query time should be investigated before changing the format ?

@jpountz
Copy link
Contributor Author

jpountz commented Mar 3, 2016

+1 on exploring this idea but I think we should merge this PR first as this proposal is a larger change and has some challenges.

@jimczi
Copy link
Contributor

jimczi commented Mar 3, 2016

Ok thanks @jpountz. I'll open a ticket for the index time boosting in _ all fields.
LGTM

This changes the `_all` field to store per-field boosts using a single byte
similarly to norms.
@jpountz jpountz force-pushed the enhancement/all_payloads_1_byte branch from dda5d3a to 2c3e484 Compare March 3, 2016 14:00
@jpountz jpountz merged commit 2c3e484 into elastic:master Mar 3, 2016
@jpountz jpountz removed the review label Mar 3, 2016
@jpountz jpountz deleted the enhancement/all_payloads_1_byte branch March 3, 2016 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories v5.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants