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

[FEATURE] Add an event to modify suggest query #3902

Closed
dmitryd opened this issue Dec 4, 2023 · 2 comments · Fixed by #3903
Closed

[FEATURE] Add an event to modify suggest query #3902

dmitryd opened this issue Dec 4, 2023 · 2 comments · Fixed by #3903

Comments

@dmitryd
Copy link
Contributor

dmitryd commented Dec 4, 2023

Describe the issue

Code in the Classes/Domain/Search/Suggest/SuggestService.php does not use ApacheSolrForTypo3\Solr\Event\Search\AfterSearchQueryHasBeenPreparedEvent. So the suggest query could either provide suggestions that will not be found by the actual query or can provide incomplete suggestions.

To Reproduce

We use solr sharding feature for a client to search multiple cores. Suggest does not provide results for them because our event handler is not called.

Expected behavior

The event is called for all search queries.

Used versions (please complete the following information):

  • TYPO3 Version: 12.4.8
  • EXT:solr Version: 12.0.1
dmitryd added a commit to dmitryd/ext-solr that referenced this issue Dec 4, 2023
@dmitryd
Copy link
Contributor Author

dmitryd commented Dec 4, 2023

Wait with it. Found a bug in the code.

dmitryd added a commit to dmitryd/ext-solr that referenced this issue Dec 4, 2023
dmitryd added a commit to dmitryd/ext-solr that referenced this issue Dec 4, 2023
@dmitryd
Copy link
Contributor Author

dmitryd commented Dec 4, 2023

Now it works as expected. There is a new event though...

dmitryd added a commit to dmitryd/ext-solr that referenced this issue Dec 4, 2023
@dmitryd dmitryd changed the title [BUG] Suggest query cannot be modified [FEATURE] Add an event to modify suggest query Dec 4, 2023
dkd-kaehm pushed a commit that referenced this issue Dec 4, 2023
This change adds a `AfterSearchQueryHasBeenPreparedEvent` for the suggest event.

Resolves: #3902
dkd-kaehm added a commit to dkd-kaehm/ext-solr that referenced this issue Dec 5, 2023
dkd-kaehm added a commit that referenced this issue Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant