Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: merge filterer and searcher concepts #3892

Merged
merged 9 commits into from
Sep 26, 2023

Conversation

SychO9
Copy link
Member

@SychO9 SychO9 commented Sep 26, 2023

Part of #3884

Changes proposed in this pull request:

  • Completely removes the concept of gambits from the backend.
  • Merges the filterer and searcher systems into a single searcher system.
  • Shared Query namespace is dropped.
  • Searcher now have Filters instead of Gambits (and Fulltext Filters).
  • Forum query parameters: it used to be when you search, the URL is changed to the following ?q=lorem is:locked. Since this doesn't work when the backend has to process that (not aware of gambits anymore). The URL is applied with filters auto transformed) into ?q=lorem&filter[locked]=true. We now also translates a set of filters into gambits (to fill the search input).
  • Extensions such as subscriptions no longer has to append to q to filter the discussion list, it only adds an actual filter.

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

@SychO9 SychO9 requested a review from a team as a code owner September 26, 2023 15:42
@SychO9 SychO9 changed the title Sm/dev search drivers backend refactor: merge filterer and searcher systems Sep 26, 2023
@SychO9 SychO9 changed the title refactor: merge filterer and searcher systems refactor: merge filterer and searcher concepts Sep 26, 2023
@SychO9 SychO9 added this to the 2.0 milestone Sep 26, 2023
@SychO9 SychO9 added breaking-changes javascript Pull requests that update Javascript code type/extensibility labels Sep 26, 2023
@SychO9
Copy link
Member Author

SychO9 commented Sep 26, 2023

I'll merge any and all search-related PRs into a separate #3893 branch so that they can still be reviewed before merging this new branch into 2.x (I need to continue building on top of all the work done so far).

@SychO9 SychO9 merged commit 1a01c97 into dev-search-drivers Sep 26, 2023
@SychO9 SychO9 deleted the sm/dev-search-drivers--backend branch September 26, 2023 16:05
SychO9 added a commit that referenced this pull request Nov 11, 2023
* refactor: move gambits to frontend (#3885)
* refactor: move gambits to frontend
* test: GambitManager
* refactor: merge filterer and searcher concepts (#3892)
* chore: drop remaining backend regex gambits
* refactor: merge filterer & searcher concept
* refactor: adapt extenders
* refactor: no longer need to push gambits to `q`
* refactor: filters to gambits
* refactor: drop shred `Query` namespace
* chore: cleanup
* chore: leftover gambit references on the backend (#3894)
* chore: leftover gambit references on the backend
* chore: namespace
* feat: search driver backend extension API (#3902)
* feat: first iteration of search drivers
* feat: indexer API & tweaks
* feat: changes after POC driver
* fix: properly fire custom observables
* chore: remove debugging code
* fix: phpstan
* fix: custom eloquent events
* chore: drop POC usage
* test: indexer extender API
* fix: extension searcher fails without filters
* fix: phpstan
* fix: frontend created gambit
* feat: advanced page and localized driver settings (#3905)
* feat: allow getting total search results and replacing filters (#3906)
* feat: allow accessing total search results
* feat: allow replacing filters
* chore: phpstan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-changes javascript Pull requests that update Javascript code type/extensibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants