Advertisement
crandom

Untitled

Sep 11th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. // Test compiling from raw JSON
  2. REQUIRE_NOTHROW(compileOps(_fj<index::search::Ops>(json::parse(R"|(
  3. [
  4. {
  5. "opCode": "engine.load",
  6. "params": {},
  7. "comment": "ENGINE load initial document set"
  8. },
  9. {
  10. "opCode": "engine.near",
  11. "params": {
  12. "words": [
  13. "queen",
  14. "elizabeth"
  15. ]
  16. },
  17. "comment": "ENGINE push documents with words near each other"
  18. },
  19. {
  20. "opCode": "engine.near",
  21. "params": {
  22. "words": [
  23. "ronald",
  24. "reagan"
  25. ]
  26. },
  27. "comment": "ENGINE push documents with words near each other"
  28. },
  29. {
  30. "opCode": "engine.or",
  31. "params": {},
  32. "comment": "ENGINE pop two sets, push all documents"
  33. },
  34. {
  35. "opCode": "engine.near",
  36. "params": {
  37. "words": [
  38. "george",
  39. "bush"
  40. ]
  41. },
  42. "comment": "ENGINE push documents with words near each other"
  43. },
  44. {
  45. "opCode": "engine.and",
  46. "params": {},
  47. "comment": "ENGINE pop two sets, push only common documents"
  48. },
  49. {
  50. "opCode": "engine.done",
  51. "params": {},
  52. "comment": "ENGINE return document set on stack"
  53. }
  54. ]
  55. )|"))));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement