Code Monkey home page Code Monkey logo

Comments (1)

bglw avatar bglw commented on September 26, 2024 1

Any stop word handling is actually something I removed before release — I can talk through why.

Reason №1 that people implement stop words is to make the index smaller, which isn't too much of a concern for Pagefind due to the chunking strategy. Since chunks are roughly fixed sizes, we can afford to care about stop words.

Reason №2 is to improve search ranking, so that searching for the editor cares more about editor than the. Removing stop words altogether is a heavy handed way of solving this, and the planned implementation of word ranking with BM25 will de-rank the the automatically without needing to put it on a list, while still keeping it in the index.

The biggest reasons to continue indexing all words is that it improves our exact phrase matching — without stop words searching for "around the world" might return results with any other word in the middle. Also, it's hard to find stop word lists that are reliably safe to ignore — especially for documentation sites where a lot of common stop words are important to search for. The first list I used had date as a stop word, for example. Or maybe you want to search MDN for let.

In any case the word weighting work will provide everything we need around improving the search rankings, without harming search precision 🙂

from pagefind.

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.