We are storing PNG images (base64 encoded) that are needed during printing inside our documents (due to a limitation of the print engine).
We have just upgraded to 2023.02 and have also changed some of the pictures that are stored in the document.
For one picture, A12 fails to store the document with the following error message:
Caused by: java.lang.IllegalArgumentException: category path exceeds maximum allowed path length: max=8191 len=11032 path=[Cockpit.Bescheid.Wappenbild_F...
at org.apache.lucene.facet.taxonomy.FacetLabel.checkComponents(FacetLabel.java:98)
at org.apache.lucene.facet.taxonomy.FacetLabel.<init>(FacetLabel.java:78)
at org.apache.lucene.facet.FacetsConfig.processFacetFields(FacetsConfig.java:380)
at org.apache.lucene.facet.FacetsConfig.build(FacetsConfig.java:344)
at com.mgmtp.a12.dataservices.search.internal.lucene.LuceneFacetSupport$FacetAnalysis.build(LuceneFacetSupport.java:86)
at com.mgmtp.a12.dataservices.search.internal.lucene.LuceneIndexDocument.getDocument(LuceneIndexDocument.java:164)
at com.mgmtp.a12.dataservices.search.internal.lucene.AbstractLuceneSearchService.updateDocumentsInIndex(AbstractLuceneSearchService.java:137)
... 194 common frames omitted
Note that there is no field in our model named Cockpit.Bescheid.Wappenbild_F..... - only a field Cockpit.Bescheid.Wappenbild so it’s apparently something outside of our control
The old encoded length of the picture was 4156 the new one is 10976.
However we have several documents in our database that use a different picture where the encoded length is 55982 bytes - but those were stored in the database with 2022.06
My questions are:
- was there a change in the behaviour between 2022.06 and 2023.02 regarding indexing of “long” strings?
- how can we disable the indexing of that field? Indexing it makes no sense to begin with.
- is there a difference between using Lucene and a Solr for this situation? Because the document with the 50k picture was stored in the database on a system using Solr.
My local Lucene is configured like this:
mgmtp.a12.dataservices.search.lucene.homeDir=c:/Projects/<PROJECT_NAME>/work/lucene/bap
mgmtp.a12.dataservices.search.service=lucene
mgmtp.a12.dataservices.search.index.initialization.mode=rebuild_index