nosvalds opened a new issue, #12021:
URL: https://github.com/apache/lucene/issues/12021

   ### Description
   
   ## Issue
   
   For fields using `large="true"`, large fields (which is what they are 
intended for) can be truncated in v9+ of Lucene.
   
   Example fieldtype definition:
   ```
   <fieldtype name="string_large"  class="solr.TextField" multiValued="false" 
indexed="false" stored="true" omitNorms="true" large="true" />
   ```
   
   ## Cause
   Looks like this is a bug introduced along with 
[LUCENE-8805](https://issues.apache.org/jira/browse/LUCENE-8805) / 
https://github.com/apache/lucene/issues/9849:
   
   
[https://github.com/apache/lucene/blob/5a694ea26ff862ecc874ca798135073d300c2234/sol[…]r/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java](https://github.com/apache/lucene/blob/5a694ea26ff862ecc874ca798135073d300c2234/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java#L462-L465)
   
   Specifically with respect to "large" fields handling.
   
   The length in utf8 bytes will often be longer than the string length 
`value.length()`, hence the truncation.
   
   ## Fix
   
   The Fix would be:
   
   `bytesRef.length = bytesRef.bytes.length`
   
   ### Version and environment details
   
   - Solr v9.1.0
   - Lucene v9.3.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to