Hello,
I begin in ElasticSearch 0.9 and I try to make a query including a
multi_match and search term in should.
I have many post with content, title, tags and ( author or creator).
I want search all post for an user for a word.
"should":
{
"multi_match": {
"query": "test",
"type": "phrase",
"slop": 4,
"fields": [
"title",
"content",
"tags"
] }
}
If the search find a comment with "test", authorId must be the id in param.
But it can't be in must node sibling of this should.
The AND operator must be in the should.
In SQL it's like that :
WHERE group = 1
AND
(
title LIKE "%test%"
OR
content LIKE "%test%"
OR
tags LIKE "%test%"
)
AND
(
authorId = 1
OR
creatorId = 1
)
group = 1 it's in the MUST
the other in SHOULD
How can I do ?
Best regards
Aurelien
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.