How to sort bigfix Relevance Data output

HI,
I have an issue while I am using the bigfix relevance to sort data output, if I am writing the relevance code with “it” clause then the data that is generated is in sorted format but as soon as I added “it” clause the data become distorted, let me use one example:-
Relevance clause for all rpm packages installed:-

  1. Without “it” clause data is sorted in alphabetic order
    Q: unique values of names of packages of rpm
    A: BESAgent
    A: BESRelay
    A: NetworkManager
    A: NetworkManager-initscripts-updown
    A: NetworkManager-libnm
    A: NetworkManager-team
    A: NetworkManager-tui
    A: WALinuxAgent
    A: WALinuxAgent-udev
    A: abrt
    A: abrt-addon-ccpp
    A: abrt-addon-coredump-helper
    A: abrt-addon-kerneloops
    A: abrt-addon-pstoreoops
    A: abrt-addon-vmcore
    A: abrt-addon-xorg
    A: abrt-cli
    A: abrt-console-notification
    A: abrt-dbus

  2. While getting the output with it clause it is all distorted
    Q: (unique values of names of it) of packages of rpm
    A: perl-perlfaq
    A: device-mapper-event
    A: grub2-tools-efi
    A: abrt-tui
    A: rust-srpm-macros
    A: libsepol-devel
    A: mariadb-connector-c
    A: libreport-plugin-mailx
    A: mdadm
    A: ocaml-srpm-macros
    A: perl-Mozilla-CA
    A: authselect
    A: publicsuffix-list-dafsa
    A: python2-requests
    A: pygobject2
    A: dyninst
    A: net-tools
    A: cups-libs

Now If I have to add more properties to it like version then I have to ad “it clause” and as soon “it” clause is added the output data is distorted, do we have a way to get the data sorted in relevance output? This sorting is not impacted because of “it” clause but do we have a way to sort the relevance output data?

Have you tried?:

unique values of (names of it as string) of packages of rpm

YEs it is providing the data in sorted, as I mention I have to add other clause also, like versions of rpm, there I am not getting any data. like I tried
unique values of (names of it,rpm version record of it) of packages of rpm
unique values of (names of it, versions of it) of packages of rpm, this particular data is not getting sorted? Any way by which we can do this?

I think I know what you mean now, I would give this a try:

 unique values of ((name of it as string | "") & "|" & (version of it as string| "")) of packages of rpm
1 Like

HI, It worked fine getting data in sorted format, can you please help me understand it a bit how this is evaluating different then the above one?

I think the issue is that @Akshay19 returned a list of Tuple object and @fermt returned a list of String object

On the documentation, https://developer.bigfix.com/relevance/search/?query=Unique%20value does not work with Tuple objects.

At least, this is what I think actually happened.

Documentation about tuples - https://developer.bigfix.com/relevance/guide/basics/tuples.html