If possible, remove limitation of 512 character strings in relevance

For some reason, string literals in relevance are limited to 512 characters.

If possible, it would be very useful if this limitation could be removed, or greatly increased.

Reference: http://support.bigfix.com/cgi-bin/inspectorsearch/single_inspector.cgi?cpx=x&keyphrase=%26lt%3Brope%26gt%3B+%26+%26lt%3Bstring%26gt%3B&type=rope&win=&lin=&hpux=&mac=&aix=&sol=&wm=&ubu=&client=1&core=1

It may get a bit confusing if I have a string literal that is longer than the property return length maximum but possibly extending it to the same as that value makes more sense. I wasnā€™t actually aware the language had a maximum for incoming strings but it may have to do with the parsing logic.

1 Like

It is definitely an annoying limitation. I didnā€™t mention it during my User Group presentation yesterday, but I actually have to break up the strings that create the Task.bes XML into multiple smaller strings and concatenate them due to this limitation.

Ideally String literals could be as long as absolutely possible, whatever that limitation is, and ideally even longer if those limitations can be removed.

Iā€™m not sure why it is currently limited to 512 characters, but it definitely causes me issues when I am using relevance to write XML for tasks & baselines.

I found the limitation. This is a bit annoying and yes we should address this.

2 Likes

Hey guys, just checking what the current limitation is. I am testing a worst case scenario for some relevance I am generating for a query via the REST API.

I found out if my relevance is greater than 2123 characters, instead of it evaluating and providing the result it returns an error message ā€œThis expression has a very long string.ā€

Maybe also this error message could be adjusted to let the user know what the maximum length is?

Hi all
Sorry for up this problem.
But i have same problem for analyze when i concatenant information.

Some one have found how to increase or remove limit please?

thanks a lot for you help

Rope inspector will help in that case, see ref. links-

https://help.hcltechsw.com/bigfix/9.2/platform/Platform/Relevance/c_this_expression_has_a_very_lon.html

https://developer.bigfix.com/relevance/reference/rope.html

https://bigfix.me/InspectorGuide/Details/44

may be i don t understand how to use it :frowning:
in my analysis, result put Error ā€¦

All my computer are Windows Server.

I do concat of line from file, but i test at start from ligne Rope (concatā€¦) but that not work.

We may need to see the relevance youā€™re trying to use.
The 512 character limit I believe is on a literal string, where youā€™ll get a message like ā€œRelevance contains a very long stringā€.

Line of file has a longer limit, 2048 characters I believe, at which it would truncate the line. There are ways around that, involving reading ā€˜bytes of fileā€™ rather than ā€˜lines of fileā€™, but the best approach depends on what youā€™re trying to accomplish.

Actually, just checked my debugger, and in current versions of BigFix the limit is 2048 characters for a literal string. Anything more than that, and youā€™d have to create a ā€˜ropeā€™ by concatenating strings.

Up to 2048 characters, all is wellā€¦

q: length of ("All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy. All work and no play mak")
A: 2048

Add a few more, and we exceed the limit

q: length of ("All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy.  DONE.")
E: This expression has a very long string.

If we create a text file with a single line containing the very long string, the ā€˜lines of fileā€™ inspector splits the line at 2048 characters.

q: size of file "c:\temp\test.txt"
A: 2074

q: number of lines of file "c:\temp\test.txt"
A: 2

q: length of line 1 of file "c:\temp\test.txt"
A: 2048

q: line 2 of file "c:\temp\test.txt"
A: es Jack a dull boy.  DONE.

If we need to get that line as one long string, we can do that, but not with the ā€˜lines of fileā€™ inspector; we have to resort to reading the bytes of the file, converting those to characters, and concatenating them together (if anyone has a better technique, Iā€™d love to hear it)

q: concatenation of characters ((bytes (integers in (0, size of it) ) of it) of file "c:\temp\test.txt")
A: All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy.  DONE.

To create a rope, we cannot start with the full string.

q: rope ("All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy.  DONE.")
E: This expression has a very long string.

If we can split the original string though, we can create a rope by concatenating the shorter strings together. I donā€™t see this as much use when weā€™re typing in literal relevance, but it could be useful if youā€™re using a script to generate the relevance and possibly end up with long strings.

q: rope ("All work and no play makes Jack a dull boy." & "  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy.  DONE.")
A: All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no play makes Jack a dull boy.  All work and no
...
2 Likes