Coder Social home page Coder Social logo

Score boosting about lifti HOT 5 CLOSED

mikegoatly avatar mikegoatly commented on July 23, 2024
Score boosting

from lifti.

Comments (5)

bielu avatar bielu commented on July 23, 2024 1

HI @mikegoatly I was just creating ticket about need of boosting, but found this ticket and I think it would be great to have field boosting! It deffo should support boosting dynamic fields and I think usage of similar to lucene syntax would be best option as it makes easier to switch between of them :)

from lifti.

mikegoatly avatar mikegoatly commented on July 23, 2024

To support freshness and magnitude boosting, we'll need to track the maximum and minimum values for each indexed item type, as well as the value for each item. This will also need storing in the serialized data and rehydrated into new indexes.

The additional score boosts should then be calculatable at scoring time.

from lifti.

mikegoatly avatar mikegoatly commented on July 23, 2024

The first bit of work for this has been merged into the v6.0.0 branch. This will allow for fields to have a score boost applied to them, like this:

var index = new FullTextIndexBuilder<string>()
    .WithObjectTokenization<TestObject3>(
        o => o.WithKey(i => i.Id)
            .WithField("Text", i => i.Text, scoreBoost: 10D)
            .WithField("MultiText", i => i.MultiText))
    .Build();

Next up, application of score boosting for freshness and dynamic boosting at query time.

Edit: Just for personal future reference when collating changes for documents, this change does also support dynamic score boosting for dynamic fields, e.g.:

var index = new FullTextIndexBuilder<string>()
    .WithObjectTokenization<TestObject3>(
        o => o.WithKey(i => i.Id)
            .WithDynamicFields("Tags", c => c.TagDictionary, "Tag_", scoreBoost: 3))
    .Build();

Although all fields that are discovered by that dynamic field provider will all receive the same score boost.

from lifti.

mikegoatly avatar mikegoatly commented on July 23, 2024

Added score boosting to the query syntax in the v6.0.0 branch, allowing for queries such as text^3. This can be applied to exact, fuzzy and wildcard matches.

from lifti.

mikegoatly avatar mikegoatly commented on July 23, 2024

Feature complete - ready to be released with v6

from lifti.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.