Giter Site home page Giter Site logo

Comments (5)

brandonkelly avatar brandonkelly commented on September 21, 2024 1

I was able to reproduce this, and fixed for the next release.

Realized there’s a related bug, where entries’ search indexes don’t get updated automatically for nested entries within Matrix fields, when the nested entries are edited directly. That’s fixed as well, but for Craft 5.2+ since the fix was a bit involved (a7d1780).

from cms.

pascalminator avatar pascalminator commented on September 21, 2024 1

I can confirm the problem is fixed now, after updating Craft to 5.1.8. Right in time to deploy this site in production!

from cms.

i-just avatar i-just commented on September 21, 2024

Hi, thanks for reaching out. The title field is always indexed, even for the entries inside a matrix field.

For example, I have a top-level entry titled “vegetables” with a CKEditor and Matrix fields in it (both have “Use this field’s values as search keywords” off). CKEditor has a nested entry titled “carrots”, and the matrix field has two nested entries titled “broccoli” and “okra”; all 4 keywords are showing in the searchindex table.
Screenshot 2024-05-20 at 10 31 31

In the control panel > Entries > All, I can search for “vegetables” and get one entry as a result, but searching for “broccoli” returns zero results. This is expected behaviour as the control panel search will search for the entries in the specified sections, and the nested entries don’t belong to a section.

There’s also this discussion, which you might find helpful. It clarifies the opposite of the behaviour you’re describing: #14978.

I hope this helps!

I’ll close this now, but feel free to reply if you run into any further problems.

from cms.

pascalminator avatar pascalminator commented on September 21, 2024

This situation is problematic for the search feature on the front-end in my eyes. The only workaround I've found is to disable the default title field and create a custom title field with the "Use this field’s values as search keywords" checkbox checked.

For example, I created a matrix to manage the content of my "about" page. However, I can't get search results for "Christine Tremblay" (because it's using the default title field), while I can get results for "Directrice générale" (because it's a custom field with "Use this field’s values as search keywords" enabled).

This discrepancy means that default title fields within Matrix blocks are not behaving as expected in search functionality, leading to incomplete search results.

image
image
image

This problem makes the default title field pointless for many user cases IMHO. Replacing it with a custom title field fixes my problem, but I'd rather use the default field because, well, it's already there.

Thank you for your time and sorry if I don't get it maybe?

from cms.

brandonkelly avatar brandonkelly commented on September 21, 2024

Craft 5.1.8 is out with that fix. Thanks again!

from cms.

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.