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

Add highlight methods to search and search builder #349

Merged
merged 10 commits into from
Feb 25, 2025

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Feb 2, 2024

This will add the core highlight methods for the highlighting search results:

$result = $this->engine->createSearchBuilder('blog')
    ->addFilter(new Condition\SearchCondition('Search Term'))
    ->highlight(
        fields: ['title', 'description'],
        preTag: '<mark>',
        postTag: '</mark>',
    )

See also #343

TODO implementation


fixes #343

@alexander-schranz alexander-schranz added features New feature or request Adapter: Elasticsearch Elasticsearch Adapter releated issue Adapter: Opensearch Opensearch Adapter related issue Adapter: Memory Memory Adapter related issue Adapter: Meilisearch Meilisearch Adapter related issue SEAL Core Seal Core related issue Adapter: Algolia Algolia Adapter related issue Adapter: Solr Solr Adapter related issue Adapter: Typesense Typesense Adapter related issue Adapter: RediSearch RediSearch Adapter related issue Adapter: Loupe Loupe Adapter related issue labels Feb 2, 2024
@alexander-schranz alexander-schranz added the help wanted Extra attention is needed label Feb 2, 2024
@alexander-schranz alexander-schranz changed the title Add highlight methods to search and search builder (#348) Add highlight methods to search and search builder Feb 3, 2024
public function getSearcher(): SearcherInterface
{
return $this->searcher;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO need to check why I exposed this in #483

@alexander-schranz alexander-schranz added Adapter: RediSearch RediSearch Adapter related issue and removed Adapter: RediSearch RediSearch Adapter related issue labels Feb 25, 2025
@alexander-schranz alexander-schranz marked this pull request as ready for review February 25, 2025 08:14
@alexander-schranz alexander-schranz merged commit b712209 into 0.7 Feb 25, 2025
47 checks passed
@alexander-schranz alexander-schranz deleted the feature/highlighting branch February 25, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Adapter: Algolia Algolia Adapter related issue Adapter: Elasticsearch Elasticsearch Adapter releated issue Adapter: Loupe Loupe Adapter related issue Adapter: Meilisearch Meilisearch Adapter related issue Adapter: Memory Memory Adapter related issue Adapter: Opensearch Opensearch Adapter related issue Adapter: RediSearch RediSearch Adapter related issue Adapter: Solr Solr Adapter related issue Adapter: Typesense Typesense Adapter related issue features New feature or request help wanted Extra attention is needed SEAL Core Seal Core related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core] Highlight search results
2 participants