[ARVADOS] created: 2.1.0-2086-g84471cca8

Git user git at public.arvados.org
Wed Mar 16 21:13:21 UTC 2022


        at  84471cca8804a3360f4eb49cc889cb2ade989bbd (commit)


commit 84471cca8804a3360f4eb49cc889cb2ade989bbd
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Mar 16 17:12:56 2022 -0400

    18767: Add API documentation about searching for file/directory names.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/doc/api/methods/collections.html.textile.liquid b/doc/api/methods/collections.html.textile.liquid
index 5ff8d529f..cb2069360 100644
--- a/doc/api/methods/collections.html.textile.liquid
+++ b/doc/api/methods/collections.html.textile.liquid
@@ -55,6 +55,36 @@ Referenced blocks are protected from garbage collection in Keep.
 
 Data can be shared with other users via the Arvados permission model.
 
+h3. Searching Collections for names of file or directories
+
+You can search collections for specific file or directory names (whole or part) using the following filter in a "list":../methods.html#index query.
+
+<pre>
+filters: [["file_names", "ilike", "%sample1234.fastq%"]]
+</pre>
+
+Note: @file_names@ is a hidden field used for indexing.  It is not returned by any API call.  On the client, to get the list of files, you will need to parse the @manifest_text at .
+
+As of this writing (Arvados 2.4), you can also search for directory paths, but _not_ complete file paths.
+
+In other words, this will work (when @dir3@ is a directory):
+
+<pre>
+filters: [["file_names", "ilike", "%dir1/dir2/dir3%"]]
+</pre>
+
+However, this will _not_ return the desired results (where @sample1234.fastq@ is a file):
+
+<pre>
+filters: [["file_names", "ilike", "%dir1/dir2/dir3/sample1234.fastq%"]]
+</pre>
+
+As a workaround, you can search for both the directory path and file name separately, and then filter on the client side.
+
+<pre>
+filters: [["file_names", "ilike", "%dir1/dir2/dir3%"], ["file_names", "ilike", "%sample1234.fastq%"]]
+</pre>
+
 h2. Methods
 
 See "Common resource methods":{{site.baseurl}}/api/methods.html for more information about @create@, @delete@, @get@, @list@, and @update at .

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list