anmi
3 years agoAdept
Select labels along with messages in one query
I query messages with
SELECT id, subject, search_snippet, body, cover_image.view_href,
teaser, view_href, author, conversation.last_post_time, replies.count(*),
metrics.views FROM messages WHERE category.id = 'DE' AND conversation.style
= 'tkb' AND body MATCHES 'mykeyword' AND depth = 0 ORDER BY post_time
DESC LIMIT 10
To get the labels of each message i currently do an additional labels query for each message.
Is there a way to get the labels along with the messages in one query?
I found this:
IN() Operator Syntax
"fieldname": { "in": [ "value1", "value2", "value3" ] }Example:
"board.id":{ "in":[ "stereos", "televisions" ] }So I think yours would look like this:
"labels.text":{ "in":[ "Text1", "Text2" ] }