Merge "Improve documentation for Search Operators by adding examples" into stable-3.5
diff --git a/src/main/resources/Documentation/change-search-operators.md b/src/main/resources/Documentation/change-search-operators.md
index c16c514..b81382b 100644
--- a/src/main/resources/Documentation/change-search-operators.md
+++ b/src/main/resources/Documentation/change-search-operators.md
@@ -17,3 +17,107 @@
To use any operator of @PLUGIN@ plugin, change operator aliasing is needed since query parser
cannot parse dash(-) in an operator.
+
+### Execution Notes:
+
+Assuming two changes, change 1 and change 2, such that change 1 depends on change 2.
+The search operators can be used as shown below:
+
+**in_depends-on:**
+
+```
+$ ssh -p 29418 user@gerrit.example.com gerrit query "independson:1" --format=JSON
+
+{
+ "project": "my-repo",
+ "branch": "master",
+ "id": "I556b2add7ab4b4209f710ebaf886a58282b64c55",
+ "number": 2,
+ "subject": "change 2",
+ "owner": {
+ "name": "Administrator",
+ "email": "admin@example.com",
+ "username": "admin"
+ },
+ "url": "http://gerrit.example.com/c/my-repo/+/21",
+ "hashtags": [],
+ "createdOn": 1715754415,
+ "lastUpdated": 1715754418,
+ "open": true,
+ "status": "NEW"
+}
+{
+ "type": "stats",
+ "rowCount": 1,
+ "runTimeMilliseconds": 37,
+ "moreChanges": false
+}
+
+
+```
+
+**has_depends-on:**
+
+```
+$ ssh -p 29418 user@gerrit.example.com gerrit query hasdependson:{change:2} --format=JSON
+
+{
+ "project": "my-repo",
+ "branch": "master",
+ "id": "I2d4818047fa9c3105636cfde1db6c7975c7da4dc",
+ "number": 1,
+ "subject": "change 1",
+ "owner": {
+ "name": "Administrator",
+ "email": "admin@example.com",
+ "username": "admin"
+ },
+ "url": "http://gerrit.example.com/c/my-repo/+/2",
+ "hashtags": [],
+ "createdOn": 1715074377,
+ "lastUpdated": 1715759836,
+ "open": true,
+ "status": "NEW"
+}
+{
+ "type": "stats",
+ "rowCount": 1,
+ "runTimeMilliseconds": 151,
+ "moreChanges": false
+}
+
+
+```
+
+**has:a_depends-on**
+
+```
+$ ssh -p 29418 user@gerrit.example.com gerrit query "change:1 has:a_depends-on" --format=JSON
+
+{
+ "project": "my-repo",
+ "branch": "master",
+ "id": "I2d4818047fa9c3105636cfde1db6c7975c7da4dc",
+ "number": 1,
+ "subject": "change 1",
+ "owner": {
+ "name": "Administrator",
+ "email": "admin@example.com",
+ "username": "admin"
+ },
+ "url": "http://gerrit.example.com/c/my-repo/+/2",
+ "hashtags": [],
+ "createdOn": 1715074377,
+ "lastUpdated": 1715759836,
+ "open": true,
+ "status": "NEW"
+}
+{
+ "type": "stats",
+ "rowCount": 1,
+ "runTimeMilliseconds": 35,
+ "moreChanges": false
+}
+
+
+```