Property value size is too large to index into this particular index

Hi.
I am facing this issue 'org.neo4j.driver.v1.exceptions.DatabaseException: Property value size:4112 of [String("……………_VNWQ")] is too large to index into this particular index.'
I have checked the documentation(https://neo4j.com/developer/kb/index-limitations-and-workaround/) and as per that, a string which is 4112 chars. long should not create problems, it is well within the limit i.e. 8kB.
Does anyone have any suggestions about how to fix this?

The size of a Java string is (source)
(bytes) = 8 * (int) ((((no chars) * 2) + 45) / 8)
For 4112 chars, that gives 8,264 bytes which is above 8167 bytes
I don't know what is this string but it seems its size needs to be reduced to fit below 8167 bytes (around 4057 chars maximum as per formula)
or as per the article, "most likely a full-text index is a better fit for what the use case"

Thanks @XavPil for the clarification.

Hi @XavPil.
I have two versions of an application. Older version runs on Java 8, uses v3.x of Neo4j, and v1.7.5 of Neo4j driver. On this version, I'm facing the above issue. The newer version runs on Java 11, uses v4.x of Neo4j, and v4.4.9 of Neo4j driver.
The above issue is observed in the older version only as I map more and more LDAP roles and token length increases beyond 4k. In the newer version, this isn't a problem even when as many LDAP roles are mapped so as to take the token length beyond 5k.
Is this behaviour observed due to the older Neo4j version in the older version as the application code in both the versions is same?

LDAP is a feature of the Enterprise edition and as such, you can use the support ticket for that kind of question.

Just to be clear, with a v3.x / Java 8, you see the limit at 4k characters limit but you are saying with v4.x / Java 11, you see a higher characters limit ?

I am facing no issues in the later version which uses Neo4j 4.x and Java 11. I have tried with a string as long as 6831 chars.
The limit of 8167 bytes or around 4057 chars. continues to be the same in the v4.x as well or has it been increased?