Guest User

Untitled

a guest
Oct 17th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. POST _search
  2. "query": {
  3. "more_like_this" : {
  4. "fields" : ["tags"],
  5. "like" : ["t1", "t2"],
  6. "min_term_freq" : 1,
  7. "min_doc_freq": 1
  8. }
  9. }
  10.  
  11. Document1 ("t1 t2") with score 0.8838835
  12. Document2 ("t1") with score 0.30685282
  13. Document3 ("t1 t3") with score 0.19178301
  14.  
  15. Document2 ("t1")
  16. Document3 ("t1 t3")
  17. Document1 ("t1 t2")
  18.  
  19. @Query("{" +
  20. " query: {" +
  21. " more_like_this : {" +
  22. " fields : ["tags"]," +
  23. " like : ["t1", "t2"]," +
  24. " min_term_freq : 1," +
  25. " min_doc_freq: 1" +
  26. " }" +
  27. " }" +
  28. "}")
  29. List<Taggeable> customMethod(String tags);
Add Comment
Please, Sign In to add comment