Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. "query" :{"match": {"title": my_query_string}}.
  2.  
  3. GET indice/_search
  4. {
  5. "query": {
  6. "bool": {
  7. "should": [
  8. {
  9. "match": {
  10. "title": "title"
  11. }
  12. },
  13. {
  14. "match": {
  15. "category": "category"
  16. }
  17. }
  18. ]
  19. }
  20. }
  21. }
  22.  
  23. "query": {
  24. "filtered": {
  25. "query": {
  26. "match": {
  27. "title": YOUR_QUERY_STRING,
  28. }
  29. },
  30. "filter": {
  31. "term": {
  32. "category": YOUR_CATEGORY
  33. }
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement