GithubHelp home page GithubHelp logo

Comments (4)

brylie avatar brylie commented on September 26, 2024

I've improved the indexing of our search code, so the results should now be more relevant overall.

it would be good that for a term like "Patricia Loring" to display top of the list ALL results that concern "Patricia Loring" and later in the list display results that concern other "Patricia" pages

Our search logic still operates using an "or" approach, where each term is treated individually. For example, searching "Patricia Loring" will return results containing either "Patricia" or "Loring." This is intentional, as it allows us to sort results by relevancy. It also works well for broader searches, like "how to promote world peace," where the engine can return results that include any combination of those words.

If we used an "and" approach, the search would only return results containing every word ("how" AND "to" AND "promote" AND "world" AND "peace"), which could reduce the overall relevancy.

After some consideration and previous discussion, we've chosen to go with the "or" operator, which is also recommended by the Wagtail documentation:

The search operator specifies how the search should behave when the user has typed in multiple search terms. There are two possible values:

  • “or” - The results must match at least one term (default for Elasticsearch)
  • “and” - The results must match all terms (default for database search)

Both operators have benefits and drawbacks. The “or” operator will return many more results but will likely contain a lot of results that aren’t relevant. The “and” operator only returns results that contain all search terms but requires the user to be more precise with their query.

We recommend using the “or” operator when ordering by relevance and the “and” operator when ordering by anything else.

https://docs.wagtail.org/en/stable/topics/search/searching.html#search-operator

from westernfriend.org.

brylie avatar brylie commented on September 26, 2024

it would be good if when searching for mistakenly for "Hoggat," when the correct spelling of the name is actually "Hoggatt," that results for "Hoggatt" would still come up. Obviously, this would pertain to many nouns searched in singular form when on the page they are listed with "s" on the end.

I looked into the idea of implementing "fuzzy matching," but we can't support it without switching our search database to Elasticsearch. Given that we're currently focused on practical maintenance, adding a new database component doesn't seem feasible at this stage in the project.

Fuzzy matching will return documents which contain terms similar to the search term, as measured by a Levenshtein edit distance.

Fuzzy matching is supported by the Elasticsearch search backend only.

https://docs.wagtail.org/en/stable/topics/search/searching.html#fuzzy-matching

from westernfriend.org.

marycklein avatar marycklein commented on September 26, 2024

from westernfriend.org.

brylie avatar brylie commented on September 26, 2024

Closing after discussion with Mary

from westernfriend.org.

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.