summaryrefslogtreecommitdiff
path: root/test/legacy28/jstests/libs/fts.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/legacy28/jstests/libs/fts.js')
-rw-r--r--test/legacy28/jstests/libs/fts.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/legacy28/jstests/libs/fts.js b/test/legacy28/jstests/libs/fts.js
new file mode 100644
index 00000000000..73b7d339ba5
--- /dev/null
+++ b/test/legacy28/jstests/libs/fts.js
@@ -0,0 +1,18 @@
+
+function queryIDS( coll, search, filter, extra ){
+ var cmd = { search : search }
+ if ( filter )
+ cmd.filter = filter;
+ if ( extra )
+ Object.extend( cmd, extra );
+ lastCommadResult = coll.runCommand( "text" , cmd);
+
+ return getIDS( lastCommadResult );
+}
+
+function getIDS( commandResult ){
+ if ( ! ( commandResult && commandResult.results ) )
+ return []
+
+ return commandResult.results.map( function(z){ return z.obj._id; } )
+}