Answer the question
In order to leave comments, you need to log in
How to search for multiple matches grouped by some field?
Analogue in sql:
select
distinct
group_id,
text
from index_1 as i1
where text like '%search_text_1%'
and exists (select 1 from index_1 as i2 where i2.group_id = i1.group_id and i2.text like
'%search_text_2%')
select
group_id,
text
from index_1
where match('@text %search_text_1%')
...?
group by group_id
Answer the question
In order to leave comments, you need to log in
The query looks like "find a group for which one document has one text, and another (or the same) has another". It seems to me that you need to make an index in which the document is a group, and just look for both matches at once. Why is that:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question