Allow for the usage of the msearch API
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Read wp-content/plugins/elasticpress/includes/classes/Elasticsearch.php, especially query(), and compare it with the msearch API behavior described in the issue. Check how the ep_skip_query_integration filter currently affects this path. Done means multiple index queries can be sent and results returned through ElasticPress without bypassing its other functions and filters.
Written by the indexing model from the issue text.
Description
Is your enhancement related to a problem? Please describe.
I would like to be able to search multiple indexes with one search query, but right now ElasticPress appears to only override one query at a time.
Describe the solution you'd like
Elasticsearch has the msearch, Multi Search, API which allows you to send many separate queries in one request and receive all of the results at once. https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
Describe alternatives you've considered
I've created my own msearch functionality by copying and modifying the contents of wp-content/plugins/elasticpress/includes/classes/Elasticsearch.php->query(). But I've consequently had to bypass the entire ElasticPress mechanism using the ep_skip_query_integration filter, which precludes the use of the majority of EP, its functions and filters - I'm essentially only using the Feature and Indexable APIs to create and sync custom indexes.
So, it would be better if msearch was integrated into EP, perhaps with a filter in the query() function that can toggle _search/_msearch?
Additional context
This is with regards to the #3 BuddyPress Integration, which requires the creation of many indexes for the various custom BP tables. It is obviously ideal to be able to do a full network-wide search for each search term.
- Dominant language
- PHP
- Stars
- 1.3k
- Forks
- 325
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 10up/ElasticPress
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
10up/ElasticPress#4402 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
10up/ElasticPress#4390 ·
Maintainers usually reply within 1 day
-
[Release] 5.3.6Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
10up/ElasticPress#4388 ·
Maintainers usually reply within 1 day
-
Move AI Features from ElasticPress Labs to the ElasticPress PluginPossibly taken @ZacharyRener claimed this 124 days ago. Openenhancement
10up/ElasticPress#4316 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Convert Pointers class to functional componentPossibly taken @ZacharyRener claimed this 288 days ago. Openenhancement
10up/ElasticPress#4261 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in 10up/ElasticPress
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-sitemap#125 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
nikic/PHP-Parser#1184 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
shukiv/jabali-panel#2474 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100