Union#2051
Conversation
ce6826a to
198393a
Compare
0945e15 to
8254dd2
Compare
81bd9a9 to
3722228
Compare
…d once in `out_of`.
|
Is it possible to "merge" the results so we don't end up with duplicated ids? (whilst still preserving the number of results asked for) Here is an example from when I do multiple searches using the I could obviously filter out the duplicates before rendering them, but that would throw the number of results off by however many duplicates I have (as an example , I had 55 results - but after removing dupes, I ended up with 28, whereas ideally I'd like 55 still :)) Thanks! |
|
Hi @youradds That is not possible right now. Can you create a feature request regarding this? |
|
I’m using union search across multiple collections and would like to retrieve facet results. Could you please let me know the correct approach for this? Specifically: How can I get facet results when performing a union search? Is it possible to get combined facet counts across all collections? |
Change Summary
{ "found": 3, "hits": [ { "document": { "content": "USA", "id": "124", "likes": 5215, "user_name": "stark_indus" }, "highlight": {}, "highlights": [] }, { "document": { "content": "CA", "id": "125", "likes": 2133, "user_name": "rogers_steve" }, "highlight": {}, "highlights": [] } ], "out_of": 3, "page": 1, "search_cutoff": false, "search_time_ms": 0, "union_request_params": [ { "collection": "posts", "first_q": "*", "per_page": 2, "q": "*" }, { "collection": "posts", "first_q": "*", "per_page": 2, "q": "*" } ] }Only global pagination parameters
"page","per_page","offset","limit", and the parameter"limit_hits"are taken into consideration in union. They are ignored when passed with individual searches."sort_by"with union requires all the searches to have the same type and number of fields and sorting order to work. For example:{ "union": true, "searches": [ { ... "sort_by": "user_name:asc" ... }, { ... "sort_by": "rating:asc" ... } ] }will return an error.
PR Checklist