Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request: jfrog rt s - allow to define include(<fields>) for aql search #320

Closed
sdrzazga opened this issue Jan 27, 2019 · 9 comments
Closed

Comments

@sdrzazga
Copy link

Hi.
It would be extremely helpful if it was possible to define include() for an aql search like possible through REST.
I want to define what field will be in the result JSON and not let jfrogcli decide this for me.
Thanks in advance!

@seanmmccormick
Copy link

This would be extremely helpful. Can you add this to your Spec File language?

@phonique
Copy link

Resurrecting, since this would still be quite useful.

@Michael-Masas
Copy link

would be useful

@jdfa
Copy link

jdfa commented Mar 30, 2023

It would be useful for me, also here is old stackoverflow question about that:
https://stackoverflow.com/questions/51246409/artifactory-aql-in-jfrog-rt-search-include-fields

@sarao1310
Copy link
Contributor

Hi all, We've released a new version that would support this issue so now you can use --include that allows you to define specific fields for aql search.
Please let us know if you have any more issues or questions.
And thank you for your feedback! 🐸

@Opolonik
Copy link

Opolonik commented Mar 11, 2024

Hi, using "jf rt s --spec=<File Spec path> [command options]" with --include flag does not seem to work or change the actual output fields of the search prompt.

Example:
debug.filespec looks like:

{
    "files": [
        {
            "aql": {
                "items.find": {
                    "repo": {"$eq": "aaa-generic-logs"},
                    "type": "folder",
                    "depth": "1",
                    "$and": [
                        {
                            "@marked_for_deletion": {"$nmatch": "*"}
                        }
                    ]
                }
            }
        }
    ]
}

Using following command:

jf rt s --spec files/debug.filespec --include="created_by"

Output:

13:05:57 [🔵Info] Searching artifacts...
13:05:58 [🔵Info] Found 3 artifacts.
[
  {
    "path": "aaa-generic-logs/test1",
    "type": "folder",
    "created": "2023-11-17T11:47:08.042+03:00",
    "modified": "2023-11-17T11:47:08.042+03:00"
  },
  {
    "path": "aaa-generic-logs/test2",
    "type": "folder",
    "created": "2023-11-23T16:21:58.297+03:00",
    "modified": "2023-11-23T16:21:58.297+03:00"
  },
  {
    "path": "aaa-generic-logs/test3",
    "type": "folder",
    "created": "2023-11-23T16:41:55.729+03:00",
    "modified": "2023-11-23T16:41:55.729+03:00"
  }
]

@PaulAGH
Copy link

PaulAGH commented Mar 28, 2024

I observed the same behavior as Opolonik using version 2.54.0. I also tried with --Include="name;repo;path;created_by" to no avail.

@kabeero
Copy link

kabeero commented Jul 30, 2024

even with v2.61.2 this problem persists

if you set

export JFROG_CLI_LOG_LEVEL=DEBUG

you will see jf completely ignores the --include directive and creates its own AQL query from the Filespec, with many more includes

@nevesing
Copy link

Does anyone have a work around for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants