-
-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add Scout package - full-text search for Hypervel #339
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
Open
binaryfire
wants to merge
59
commits into
hypervel:main
Choose a base branch
from
binaryfire:feature/scout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+12,329
−3
Open
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
51a6dee
Add Scout package structure and abstract Engine class
binaryfire bd6f86e
Add SearchableInterface contract
binaryfire ba47453
Add EngineManager with static engine caching
binaryfire 3b6a1d9
Add Builder search query builder
binaryfire 0b3e1ad
Add Searchable trait with coroutine-safe sync disable
binaryfire e5ab651
Add SearchableScope and batch import events
binaryfire 79f53b4
Add Scout configuration file
binaryfire 8d20696
Add ScoutServiceProvider
binaryfire c560016
Add NullEngine for disabling search
binaryfire 9309738
Add CollectionEngine for in-memory search
binaryfire 923b0ae
Add MeilisearchEngine with tenant token support
binaryfire 1fa4df7
Add queue jobs for searchable operations
binaryfire d9947b4
Add UpdatesIndexSettings contract and ScoutException
binaryfire 52416ef
Add FlushCommand for clearing search index
binaryfire c620104
Add ImportCommand for bulk indexing
binaryfire 1d0e192
Add IndexCommand for creating search indexes
binaryfire 061b777
Add DeleteIndexCommand for removing search indexes
binaryfire 5cf405e
Add SyncIndexSettingsCommand for syncing index settings
binaryfire fd9834f
Add Scout test fixtures
binaryfire 11a6b53
Fix imports to follow Hypervel patterns
binaryfire 56bbe4e
Add Scout package to composer.json and add NullEngineTest
binaryfire ced0a87
Add Scout test infrastructure and CollectionEngineTest
binaryfire 7849234
Add MeilisearchEngineTest with 26 test cases
binaryfire 02c3159
Add BuilderTest with 30 test cases
binaryfire bc4c4d3
Add EngineManagerTest with 16 test cases
binaryfire 651dad7
Add SearchableModelTest with 15 test cases
binaryfire c0bd17e
Add CoroutineSafetyTest with 4 test cases
binaryfire 115e542
Fix tests and phpstan errors
binaryfire 43aa237
Improve Scout package with Laravel API parity and fixes
binaryfire 4ddd084
Add after_commit support for queued Scout operations
binaryfire 5cadc19
Fix tests and phpstan errors
binaryfire 8525f4a
Fix bulk import concurrency and makeSearchableUsing behavior
binaryfire 2893f6e
Guard SCOUT_COMMAND define against redefinition warning
binaryfire d0c3c67
Add tests for RemoveableScoutCollection and RemoveFromSearch job
binaryfire 9ac61e2
Add DatabaseEngine and TypesenseEngine to Scout
binaryfire 136cd76
Apply php-cs-fixer formatting
binaryfire 0a509c8
Add EngineManager and TypesenseEngine tests, fix Scout package metadata
binaryfire 0123320
Fix Scout package issues identified in code review
binaryfire 0995b27
Resolve TypesenseClient from container for DI consistency
binaryfire eedebab
Add tests for SearchUsingPrefix attribute and SearchableScope macros
binaryfire 7f74f7d
Fix shouldBeSearchable test to verify actual filtering behavior
binaryfire 04bbc03
Add integration test infrastructure for Meilisearch and Typesense
binaryfire 00373df
Add comprehensive Scout integration tests for Meilisearch and Typesense
binaryfire d3f934f
Fix Scout command concurrent execution with proper waiting
binaryfire a472bb3
Refactor Scout test infrastructure and simplify ImportCommand
binaryfire 549578d
Add config tests and fix TypesenseEngine maxTotalResults enforcement
binaryfire 7778d1d
Simplify Scout searchable job execution
binaryfire 4d99d55
Fix code style in Searchable trait
binaryfire 62d1d7a
Merge main into feature/scout
binaryfire ab69e84
Test: remove bootstrap to debug CI failure
binaryfire 6534852
Revert bootstrap removal - not the cause
binaryfire 7a1df85
Test: revert HasAttributes change to debug CI failure
binaryfire b9a8323
Revert HasAttributes revert - not the cause
binaryfire 44338f0
Merge branch 'main' into feature/scout
binaryfire 43b6e75
Update README
binaryfire 969752c
Add DeleteAllIndexesCommand and PaginatesEloquentModels contract
binaryfire e9b45bc
Add tests for pagination contract delegation in Builder
binaryfire 2f076e3
Add unit tests for ImportCommand and SyncIndexSettingsCommand
binaryfire b10df66
Add Scout utility class for customizable job dispatch
binaryfire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Integration Tests | ||
| # Copy this file to .env and configure to run integration tests locally. | ||
| # Tests are skipped by default. Set the RUN_*_INTEGRATION_TESTS vars to enable. | ||
|
|
||
| # Meilisearch Integration Tests | ||
| RUN_MEILISEARCH_INTEGRATION_TESTS=false | ||
| MEILISEARCH_HOST=127.0.0.1 | ||
| MEILISEARCH_PORT=7700 | ||
| MEILISEARCH_KEY=secret | ||
|
|
||
| # Typesense Integration Tests | ||
| RUN_TYPESENSE_INTEGRATION_TESTS=false | ||
| TYPESENSE_HOST=127.0.0.1 | ||
| TYPESENSE_PORT=8108 | ||
| TYPESENSE_API_KEY=secret | ||
| TYPESENSE_PROTOCOL=http |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| The MIT License (MIT) | ||
|
|
||
| Copyright (c) Taylor Otwell | ||
|
|
||
| Copyright (c) Hypervel | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Scout for Hypervel | ||
| === | ||
|
|
||
| [](https://deepwiki.com/hypervel/scout) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| { | ||
| "name": "hypervel/scout", | ||
| "type": "library", | ||
| "description": "Full-text search for Eloquent models.", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "php", | ||
| "hypervel", | ||
| "scout", | ||
| "search", | ||
| "full-text-search", | ||
| "meilisearch", | ||
| "typesense", | ||
| "database" | ||
| ], | ||
| "authors": [ | ||
| { | ||
| "name": "Albert Chen", | ||
| "email": "albert@hypervel.org" | ||
| } | ||
| ], | ||
| "support": { | ||
| "issues": "https://github.com/hypervel/components/issues", | ||
| "source": "https://github.com/hypervel/components" | ||
| }, | ||
| "autoload": { | ||
| "psr-4": { | ||
| "Hypervel\\Scout\\": "src/" | ||
| } | ||
| }, | ||
| "require": { | ||
| "php": "^8.2", | ||
| "hypervel/config": "^0.3", | ||
| "hypervel/console": "^0.3", | ||
| "hypervel/core": "^0.3", | ||
| "hypervel/coroutine": "^0.3", | ||
| "hypervel/event": "^0.3", | ||
| "hypervel/queue": "^0.3", | ||
| "hypervel/support": "^0.3" | ||
| }, | ||
| "suggest": { | ||
| "meilisearch/meilisearch-php": "Required for Meilisearch driver (^1.0)", | ||
| "typesense/typesense-php": "Required for Typesense driver (^5.2)" | ||
| }, | ||
| "config": { | ||
| "sort-packages": true | ||
| }, | ||
| "extra": { | ||
| "branch-alias": { | ||
| "dev-main": "0.3-dev" | ||
| }, | ||
| "hypervel": { | ||
| "providers": [ | ||
| "Hypervel\\Scout\\ScoutServiceProvider" | ||
| ] | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.