Coder Social home page Coder Social logo

Comments (10)

azanetti avatar azanetti commented on May 5, 2024 1

I think we should go for 100. What do you think @worldskillsfrance?

from worldskills-infrastructure-list.

fabian avatar fabian commented on May 5, 2024

I fixed part of this - the search is now done in the current language.

from worldskills-infrastructure-list.

Simon-Woirgard avatar Simon-Woirgard commented on May 5, 2024

Ok great, what is still have do be done ?
Did you push in staging and/or production ?

from worldskills-infrastructure-list.

fabian avatar fabian commented on May 5, 2024

The following still needs to be done, but I understood it has less priority?

The autocomplete should favor exact matches and then "starts with" matches and at last the "contains" results.

I pushed it to staging and will push it to production tomorrow.

from worldskills-infrastructure-list.

Simon-Woirgard avatar Simon-Woirgard commented on May 5, 2024

As discussed with Adam Skype, this is important for us. This will prevent the addition of existing lines in the catalog when adding an item in the requeste item.

from worldskills-infrastructure-list.

fabian avatar fabian commented on May 5, 2024

@worldskillsfrance Can you provide an example where you see the problem happening?

from worldskills-infrastructure-list.

fabian avatar fabian commented on May 5, 2024
  • Search for "Table" in "National Skills Competition, WorldSkills France." on Staging
  • "Table" is not in result list.

Could be because there's a limit on the results or because it has the wrong language (locale) key in the database.

from worldskills-infrastructure-list.

fabian avatar fabian commented on May 5, 2024

I noticed the values for "Table" in the database have the language key fr_FR. I assume this happened before we adjusted Accept-Language in #37.

I have now manually fixed the Table:

UPDATE i18n_value SET lang_code = 'fr' WHERE lang_code = 'fr_FR';

However this doesn't seem to be the issue, as the table is still not found.

Unfortunately there is a limit of 25 items on the search and just removing it would cause performance issues.

Searching for matches which have the search query at the beginning also wouldn't be a good solution as that would make it less likely for someone to find an existing matching item, if they start the name with something else.

Searching for matches at the beginning first and then for matches in the middle of the work also doesn't solve the problem in the case there are more than 25 items with the query in the beginning.

A good solution would be to add a proper search with Lucene but that would require quite some development.

A quick solution might be to increase the limit to 100 items for now.

from worldskills-infrastructure-list.

fabian avatar fabian commented on May 5, 2024

Okay, limit increased to 100.

from worldskills-infrastructure-list.

Simon-Woirgard avatar Simon-Woirgard commented on May 5, 2024

Thx Fabian, this is good for the moment.
The best would be :

  • The autocomplete should favor exact matches and then "starts with" matches and at last the "contains" results.

from worldskills-infrastructure-list.

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.