-
Notifications
You must be signed in to change notification settings - Fork 63
Wordpress Filters
Paris Holley edited this page Jun 18, 2015
·
5 revisions
All filters executed in the plugin start with "elasticsearch_", followed by the path to the class with "_" as a directory separator. If a filter exists to simply alter returned output of an API method, view the API documentation to determine what the return should look like. Otherwise, review the examples in this wiki document or take a look at the unit tests.
- Config
- elasticsearch_config_option($value, $name)
- elasticsearch_config_score($value, $type, $name)
- elasticsearch_config_ranges($value, $field)
- elasticsearch_config_fields($value)
- elasticsearch_config_facets($value)
- elasticsearch_config_types($value)
- elasticsearch_config_taxonomies($value)
- Indexer
- elasticsearch_indexer_per_page ($value) - Alter the number of posts indexed per page (ajax requests in admin)
- elasticsearch_indexer_get_posts ($posts) - Modify arguments used to query wordpress for posts to index
- elasticsearch_indexer_map_taxonomy ($mapping, $taxonomy) - Modify mapping settings for taxonomies
- elasticsearch_indexer_map_field ($mapping, $field) - Modify mapping settings for field
- elasticsearch_indexer_build_document ($document, $post) - Modify document array before it is sent to indexer
- Searcher
- elasticsearch_searcher_query (\Elastica\Query $query) - Modify elastica client query object before execution
- elasticsearch_searcher_search (\Elastica\Search $search, \Elastica\Query $query) - Modify elastica client search object before execution
- elasticsearch_searcher_results ($results, \Elastica\Response $response) - Modify the plugins results after execution
- elasticsearch_searcher_query_exclude_fields ($excluded) - Add additional excluded fields from being added to search query
- elasticsearch_searcher_query_pre_facet_filter ($args) - Modify query part of elastic search before facet information is added
- elasticsearch_searcher_query_poist_facet_filter ($args) - Modify query part of elastic search after facet information is added