Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. curl -X POST \
  2. https://schoolsearch-api.qa.collegeconfidential.com/suggest/_search \
  3. -H 'Accept: */*' \
  4. -H 'Accept-Encoding: gzip, deflate' \
  5. -H 'Cache-Control: no-cache' \
  6. -H 'Connection: keep-alive' \
  7. -H 'Content-Length: 736' \
  8. -H 'Content-Type: application/json' \
  9. -H 'Host: schoolsearch-api.qa.collegeconfidential.com' \
  10. -H 'Postman-Token: 23b5c67a-a22a-4016-aee2-6f8cbc42261b,ee85990d-5abd-4352-8573-cd1c5366557d' \
  11. -H 'User-Agent: PostmanRuntime/7.18.0' \
  12. -H 'cache-control: no-cache' \
  13. -d '{
  14. "size": 20,
  15. "sort": [
  16. "_score"
  17. ],
  18. "query": {
  19. "function_score": {
  20. "query": {
  21. "match_phrase": {
  22. "text": "arabic language"
  23. }
  24. },
  25. "functions": [
  26. {
  27. "field_value_factor": {
  28. "field": "weight",
  29. "factor": 1.2,
  30. "missing": 1
  31. }
  32. },
  33. {
  34. "script_score": {
  35. "script": "doc['\''_type'\''].value == '\''state'\'' || doc['\''_type'\''].value == '\''major'\'' ? _score * 10000 : _score"
  36. }
  37. }
  38. ]
  39. }
  40. }
  41. }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement