Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Test compiling from raw JSON
- REQUIRE_NOTHROW(compileOps(_fj<index::search::Ops>(json::parse(R"|(
- [
- {
- "opCode": "engine.load",
- "params": {},
- "comment": "ENGINE load initial document set"
- },
- {
- "opCode": "engine.near",
- "params": {
- "words": [
- "queen",
- "elizabeth"
- ]
- },
- "comment": "ENGINE push documents with words near each other"
- },
- {
- "opCode": "engine.near",
- "params": {
- "words": [
- "ronald",
- "reagan"
- ]
- },
- "comment": "ENGINE push documents with words near each other"
- },
- {
- "opCode": "engine.or",
- "params": {},
- "comment": "ENGINE pop two sets, push all documents"
- },
- {
- "opCode": "engine.near",
- "params": {
- "words": [
- "george",
- "bush"
- ]
- },
- "comment": "ENGINE push documents with words near each other"
- },
- {
- "opCode": "engine.and",
- "params": {},
- "comment": "ENGINE pop two sets, push only common documents"
- },
- {
- "opCode": "engine.done",
- "params": {},
- "comment": "ENGINE return document set on stack"
- }
- ]
- )|"))));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement