Actually i'm working on a project to put important search on my website
company, from SQL, to ES. The main prob for me is the grouping function.
Just a samall explain first
I have messages from users, grouped by thread. In the sql schema, i have a
table for thread, a table for messages with an id referencing an index from
the thread message (foreign key). On the webiste, we show first the list of
thread to customer. And on this list, depending on which sort the user
choose, we show only the first message corresponding on each thread.
To achieve this, i try tochange my data model. But not find any idea very
relevant. So after some nightmare, i tried the nested object. It's awful
when you need to index hundreds of messages per thread. Each time i add a
message, the whole thread is re indexed... And by the way, when i search on
the index, the object returned is always the full thread with all childs.
So, i give another try to Parent/Child way. It was also not what i need. So
first i created the thread object, and then the message one, with parent
pointing to the thread one. The request top_children is good to sort the
thread based on messages... But the main concern is that i don't know how
to retrieve the message field, from the message involved in the thread
selection. And i absolutely need to get this fields... With the scope, i am
able to have good facets, but the lack of child fields is blocking for me.
Some of you know how to get rid of these problem ? All my consideration,
love, repect and whatever to the one who will help me!
I also put my question in the french group, but i saw that the original one
is more active.
Thx in advance,