Add recipe for search backend

Created on 15 August 2024, 8 months ago

Based on the concept created in the issue Specification document for Advanced search in Starshot 🌱 Specification document for Advanced search in Drupal CMS Needs review a recipe for the search backend has to be created.

πŸ“Œ Task
Status

Active

Component

Track: Advanced Search

Created by

πŸ‡©πŸ‡ͺGermany breidert

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @breidert
  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    a.dmitriiev β†’ made their first commit to this issue’s fork.

  • Pipeline finished with Failed
    6 months ago
    Total: 569s
    #306027
  • Merge request !127Resolve #3468271 "Search backend" β†’ (Merged) created by a.dmitriiev
  • Pipeline finished with Failed
    6 months ago
    Total: 192s
    #307119
  • Pipeline finished with Failed
    6 months ago
    Total: 192s
    #307120
  • Pipeline finished with Failed
    6 months ago
    Total: 679s
    #307143
  • Pipeline finished with Success
    6 months ago
    Total: 664s
    #307195
  • Pipeline finished with Success
    6 months ago
    Total: 680s
    #307203
  • Pipeline finished with Success
    6 months ago
    Total: 686s
    #307204
  • Pipeline finished with Failed
    6 months ago
    Total: 66s
    #311350
  • Pipeline finished with Failed
    6 months ago
    Total: 64s
    #311351
  • Pipeline finished with Failed
    6 months ago
    Total: 64s
    #311382
  • Pipeline finished with Failed
    6 months ago
    Total: 184s
    #311381
  • Pipeline finished with Failed
    6 months ago
    Total: 42s
    #311387
  • Pipeline finished with Failed
    6 months ago
    Total: 71s
    #311388
  • Pipeline finished with Success
    6 months ago
    Total: 698s
    #311393
  • Pipeline finished with Success
    6 months ago
    Total: 782s
    #311394
  • Pipeline finished with Running
    6 months ago
    #312222
  • Pipeline finished with Running
    6 months ago
    #312223
  • Assigned to a.dmitriiev
  • Pipeline finished with Canceled
    6 months ago
    Total: 393s
    #313483
  • Pipeline finished with Success
    6 months ago
    Total: 842s
    #313490
  • Pipeline finished with Success
    6 months ago
    Total: 936s
    #313489
  • Pipeline finished with Failed
    6 months ago
    Total: 914s
    #313543
  • Pipeline finished with Failed
    6 months ago
    Total: 863s
    #313688
  • Pipeline finished with Failed
    6 months ago
    Total: 988s
    #313773
  • Pipeline finished with Failed
    6 months ago
    #313774
  • Pipeline finished with Failed
    6 months ago
    Total: 954s
    #313898
  • Pipeline finished with Failed
    6 months ago
    Total: 980s
    #313897
  • Pipeline finished with Failed
    5 months ago
    Total: 942s
    #315671
  • Pipeline finished with Failed
    5 months ago
    Total: 802s
    #316135
  • Pipeline finished with Failed
    5 months ago
    Total: 806s
    #316134
  • Pipeline finished with Failed
    5 months ago
    Total: 769s
    #316192
  • Pipeline finished with Failed
    5 months ago
    Total: 773s
    #316193
  • Pipeline finished with Failed
    5 months ago
    Total: 800s
    #316737
  • Pipeline finished with Failed
    5 months ago
    Total: 800s
    #316738
  • Pipeline finished with Failed
    5 months ago
    Total: 745s
    #316771
  • Pipeline finished with Failed
    5 months ago
    Total: 753s
    #316772
  • Pipeline finished with Success
    5 months ago
    Total: 782s
    #316789
  • Pipeline finished with Success
    5 months ago
    Total: 799s
    #316790
  • Pipeline finished with Canceled
    5 months ago
    Total: 455s
    #318456
  • Pipeline finished with Canceled
    5 months ago
    Total: 465s
    #318457
  • Pipeline finished with Failed
    5 months ago
    Total: 604s
    #318476
  • Pipeline finished with Failed
    5 months ago
    Total: 683s
    #318477
  • Pipeline finished with Failed
    5 months ago
    #319684
  • Pipeline finished with Failed
    5 months ago
    Total: 1002s
    #319683
  • Pipeline finished with Failed
    5 months ago
    Total: 796s
    #319710
  • Pipeline finished with Failed
    5 months ago
    Total: 957s
    #319711
  • Pipeline finished with Failed
    5 months ago
    Total: 696s
    #320377
  • Pipeline finished with Failed
    5 months ago
    Total: 701s
    #320376
  • Pipeline finished with Failed
    5 months ago
    Total: 975s
    #320768
  • Pipeline finished with Failed
    5 months ago
    Total: 1105s
    #321342
  • Pipeline finished with Failed
    5 months ago
    Total: 1263s
    #321341
  • Pipeline finished with Failed
    5 months ago
    Total: 190s
    #323906
  • Pipeline finished with Failed
    5 months ago
    #331096
  • Pipeline finished with Failed
    5 months ago
    #331095
  • Pipeline finished with Running
    5 months ago
    #331135
  • Pipeline finished with Running
    5 months ago
    #331134
  • Pipeline finished with Failed
    5 months ago
    #331179
  • Pipeline finished with Failed
    5 months ago
    #331180
  • πŸ‡¬πŸ‡§United Kingdom catch

    It looks like there's an MR to review here.

  • Pipeline finished with Running
    5 months ago
    #331888
  • Pipeline finished with Running
    5 months ago
    #331889
  • Pipeline finished with Failed
    5 months ago
    #331911
  • Pipeline finished with Failed
    5 months ago
    #331912
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    This looks like a great start. My main concerns are:

    • This absolutely needs test coverage; a ComponentValidationTest at the minimum. Ideally we'd get some end-to-end (Cypress) testing as well.
    • This feels like too many recipes -- we don't really want to offer a ton of small parts that only do one thing, that's a UNIX philosophy that is friendly to developers, but likely confusing to site builders and end users. We should ship, maybe, two recipes at most. I thought the plan was to offer Basic Search and Advanced Search - what happened with that?
    • There are a few questionable practices in use here, like creating entire config entities using actions. This is no longer appropriate now that we have support for lenient comparison with existing config.
    • I'd like certain user-facing wording to be a little more robust and descriptive, but I'm happy to help with that.
  • Pipeline finished with Failed
    5 months ago
    Total: 656s
    #333999
  • Pipeline finished with Failed
    5 months ago
    Total: 667s
    #333998
  • Pipeline finished with Failed
    5 months ago
    Total: 109s
    #334006
  • Pipeline finished with Failed
    5 months ago
    Total: 109s
    #334007
  • Pipeline finished with Failed
    5 months ago
    Total: 104s
    #334023
  • Pipeline finished with Failed
    5 months ago
    Total: 98s
    #334033
  • Pipeline finished with Failed
    5 months ago
    Total: 98s
    #334034
  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    I tried to address all the comments from the MR. But now as Drupal CMS requires Drupal 11, there are some more problems with recipe dependencies, as Facets are not yet Drupal 11 compatible, though there is an issue https://www.drupal.org/project/facets/issues/3455217 πŸ“Œ Automated Drupal 11 compatibility fixes for facets Active already with MR (I will try to push this forward as much as I can). The same is with Simple Search Form module. I have already created a co-maintainer request issue https://www.drupal.org/project/simple_search_form/issues/3486501 πŸ’¬ Co-maintainer request Active and that module also already have Drupal 11 compatibility issue https://www.drupal.org/project/simple_search_form/issues/3434565 πŸ“Œ Automated Drupal 11 compatibility fixes for simple_search_form Needs review .

    Indeed there are also 3 patches to Search API module included in the recipe as well. I worked on one of them https://www.drupal.org/project/search_api/issues/3483366 ✨ Need a way to populate some config values with list of available entity bundles with config actions Active to allow setting global settings for index and search results view. This is needed as the list of content types is not known for the recipe in advance. I am waiting for the feedback of the maintainer of search_api module. The other 2 patches are not critical but also would be nice to have.

    There are also 2 Drupal core patches. Both are with needs review status: https://www.drupal.org/project/drupal/issues/3483353 ✨ Consider making the createCopy config action optionally fail if the entity display already exists Active and https://www.drupal.org/project/drupal/issues/3305859 πŸ“Œ Add config actions for views Active (this one has Needs work because of some automated checks, I will check them now).

    I have also added the tests, but at the moment pipeline fails because of Drupal 11 compatibiliy.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    @a.dmitriiev, thanks for the reply.

    D11 support is non-negotiable from a product/release perspective, so I think the correct answer here is probably rescoping. The current MR is already quite a bit larger than the declared scope of this issue anyway.

    Are Facets and Simple Search Form needed for creating a search backend? If they are, then I guess this issue is blocked. If they're not, I would suggest removing them, and the recipes that use them, for now. We can add those features in other issues which can have smaller numbers of blockers. I think it would be better to ship a strong, supported search backend and kludgey UI, then add Facets later when it supports D11, than ship a more complete package much later. Incremental, rapid improvement is the name of the game with Drupal CMS.

    So let's dial back the scope here, and in this issue only add a recipe that provides a search backend (even if there's no UI beyond that), and the most basic possible UI for it. What do you think?

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Also, can you please add the blockers as related issues?

  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    Adding blockers, other issues with patches are optional and probably would need a clean-up in recipe.

  • πŸ‡ΈπŸ‡°Slovakia poker10

    Facets have a lot of open issues and personally I am not sure if we should ever include it unless these issues are fixed:

    🌱 [META] Overview of Facets + Ajax issues Active
    πŸ› Facets with AJAX not working in most of situations Needs work

    It is problematic to run Facets even on Drupal 10.3 if you want to enable ajax. Yes, we can probably ship it without ajax enabled, but if someone start to explore these options, it will be very easy to break everything.

    So +1 from me to removing Facets for now.

  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    @poker10 the issues mentioned by you are for Facets version 2.x. The recipe includes Facets 3.x that was completely rewritten to "natively" support views exposed filters, there is even a special submodule facets_exposed_form now included in the codebase for that. As it is now just a views filter and not a block as it was before, there are no problems with ajax anymore.

  • πŸ‡ΈπŸ‡°Slovakia poker10

    Thank you for the explanation @a.dmitriiev. I haven't noticed the new beta release of the 3.x branch from the last week). When we tried the 3.x branch few months ago, in that time it was not possible to use it as a replacement for 2.x branch, as it still had a lot of issues. We will take a look at the new changes :)

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    For me, facets and autocomplete are both nice to have so would rather get a recipe in without those while we work on what's needed to get them added later.

  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    Some update:

    Module https://www.drupal.org/project/simple_search_form β†’ now has Drupal 11 support. I have a contact with the module maintainer and I am also co-maintainer now, just in case.

    As for Facets, I am also in contact with Jimmy Henderickx (strykaizer), who is in charge of version 3 and the Drupal 11 support is now the highest prio, so I believe this will be added very soon.

    The blocking issue for search_api https://www.drupal.org/project/search_api/issues/3483366 ✨ Need a way to populate some config values with list of available entity bundles with config actions Active now only needs tests and can be completed soon, here I am also in contact with module maintainer.

  • Pipeline finished with Failed
    5 months ago
    Total: 104s
    #338560
  • Pipeline finished with Failed
    5 months ago
    Total: 105s
    #338561
  • Pipeline finished with Failed
    5 months ago
    Total: 74s
    #338562
  • Pipeline finished with Failed
    5 months ago
    Total: 75s
    #338563
  • Pipeline finished with Failed
    5 months ago
    #339577
  • Pipeline finished with Failed
    5 months ago
    Total: 739s
    #339578
  • Pipeline finished with Failed
    5 months ago
    Total: 513s
    #339682
  • Pipeline finished with Failed
    5 months ago
    Total: 512s
    #339683
  • Pipeline finished with Failed
    5 months ago
    Total: 532s
    #339689
  • Pipeline finished with Failed
    5 months ago
    Total: 496s
    #339957
  • Pipeline finished with Failed
    5 months ago
    Total: 503s
    #340028
  • Pipeline finished with Failed
    5 months ago
    Total: 508s
    #340027
  • Pipeline finished with Canceled
    5 months ago
    Total: 64s
    #340050
  • Pipeline finished with Canceled
    5 months ago
    Total: 64s
    #340051
  • Pipeline finished with Failed
    5 months ago
    Total: 675s
    #340053
  • Pipeline finished with Failed
    5 months ago
    Total: 669s
    #340064
  • Pipeline finished with Failed
    5 months ago
    Total: 728s
    #340063
  • Pipeline finished with Failed
    5 months ago
    Total: 476s
    #340110
  • Pipeline finished with Failed
    5 months ago
    Total: 717s
    #340122
  • Pipeline finished with Failed
    5 months ago
    Total: 771s
    #340123
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    So I reviewed this and I actually think it looks pretty good! Here are a few major suggestions:

    • Your patches are not being applied because you need to add drupal/drupal_cms_search to project_template/composer.json as a dependency. Do that, and then run ddev rebuild, and you should be fully patched.
    • We are most likely going to remove the drupal_cms_search_filters recipe due to Facets not being D11 compatible yet. It's not in scope for this issue anyway, so it should be removed and put into another issue/MR. Can you do that?
    • "drupal_cms" is not a descriptive or helpful machine name for the search server or index.
    • The test coverage is admirable, but it also is not really testing anything valuable beyond the recipes' idempotency. What would be best, IMHO, is to add a single end-to-end Cypress test to drupal_cms_search which does something like:
      • log in as a content editor and add some nodes: one included in the index and published, one indexed but not published, one published and excluded, one unpublished and excluded
      • run cron
      • log out
      • confirm that the published, non-excluded nodes is found when you search for them

      To me, that would prove that the recipe is actually delivering what is intended. We could add this test later in a follow-up so as not to block commit; the idempotency tests are enough to get this merged.

    • @breidert explained to me that drupal_cms_search_base is split out from drupal_cms_search in order to facilitate decoupled searching later. I think that's something we can consider for the future, but we should not do it now; we should just have a single drupal_cms_search recipe with all of this stuff. We can split it out later as demand dictates.
  • Pipeline finished with Failed
    4 months ago
    Total: 567s
    #344526
  • Pipeline finished with Failed
    4 months ago
    Total: 648s
    #344669
  • Pipeline finished with Failed
    4 months ago
    Total: 655s
    #344670
  • πŸ‡©πŸ‡ͺGermany a.dmitriiev

    I have addressed all the comments in MR and also now there is only 1 recipe for search that combines all the functionality. Facet filters will be added in a separate issue.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    From a code review perspective, I think this looks excellent. Tests are failing, though - chances are there is an idempotency bug. Kicking back for that.

  • Pipeline finished with Failed
    4 months ago
    Total: 490s
    #344860
  • Pipeline finished with Failed
    4 months ago
    Total: 412s
    #344894
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    The tests were failing due to a core bug - I've filed πŸ› The PlaceBlock config action doesn't account for the possibility of there being no other blocks in the region Active to deal with that separately. In the meantime, it's unlikely to affect real-world sites, and can be worked around in the test. So that's what I did.

    This is ready for final review by @pameeela!

  • πŸ‡©πŸ‡ͺGermany breidert

    The search is missing styling. This will be handled in the subtheme of Olivero πŸ“Œ [Meta] Plan for Olivero subtheme Active and organised in separate issues.

  • Pipeline finished with Failed
    4 months ago
    Total: 526s
    #346101
  • Pipeline finished with Failed
    4 months ago
    Total: 492s
    #346116
  • Pipeline finished with Failed
    4 months ago
    Total: 609s
    #346120
  • Pipeline finished with Failed
    4 months ago
    Total: 666s
    #346167
  • Pipeline finished with Failed
    4 months ago
    Total: 638s
    #346168
  • πŸ‡¦πŸ‡ΊAustralia pameeela

    So I think the core bug does affect us, but I would be OK to merge this as WIP since it's not applied by the starter and isn't exposed in the UI. And will unblock other things.

    But here's what happened when I tested it:

    • Since the recipe is not applied by the starter, I applied it via cli.
    • Testing the actual search, I landed on a 404 page at /search. I could see this was an existing views page, so I cleared the cache, and then the page worked as expected.
    • Figured I would make sure the same didn't happen when it is applied by the starter recipe, but the installer failed on (I am assuming this is the core bug!):
      An AJAX HTTP error occurred.
      HTTP Result Code: 200
      Debugging information follows.
      Path: /core/install.php?profile=drupal_cms_installer&langcode=en&recipes%5B0%5D=drupal_cms_starter&site_name=My%20awesome%20site&id=1&op=do_nojs&op=do
      StatusText: parsererror
      ResponseText: Error: Call to a member function getWeight() on false in Drupal\block\Plugin\ConfigAction\PlaceBlock->apply() (line 82 of /var/www/html/web/core/modules/block/src/Plugin/ConfigAction/PlaceBlock.php).

    I'll leave it with Adam to decide how to proceed.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    That is, in fact, a core bug with an open issue. The fact that it is a bug in an experimental subsystem means we may be able to land it during core's RC, but I'll get a patch up tomorrow and mark it as a stable blocker for Drupal CMS.

    That also explains why tests don't break - we test the installer every way it can be run (CLI -- both core and Drush -- and interactive), but so long as that recipe is not applied by the starter, this problem will be skipped.

    I, too, am therefore okay committing it as a WIP. Can't promise it will land in the stable release of Drupal CMS (both because of the bugs here and the fact that it relies on Search API rolling a new release in time for our RC), but at least we can aim for the stars.

    Back to you for the RTBC, @pameeela.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • πŸ‡¦πŸ‡ΊAustralia pameeela
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • Pipeline finished with Failed
    4 months ago
    Total: 1415s
    #346545
  • Pipeline finished with Skipped
    4 months ago
    #346555
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Boom! Merged into 0.x. Congrats, everyone! As a next step, let's move the facets recipe and the end-to-end test to their own respective issues. See you there!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024