[ 
https://issues.apache.org/jira/browse/LUCENE-9303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073772#comment-17073772
 ] 

Jan Høydahl commented on LUCENE-9303:
-------------------------------------

Thanks. I encourage you to open a GitHub Pull Request for your proposed fix. 
Make sure to start the title with LUCENE-9393 so it gets linked to this issue. 
Once you have a patch, one of us will review and merge it.

> There may be can simpler in DefaultIndexingChain
> ------------------------------------------------
>
>                 Key: LUCENE-9303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9303
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/index
>    Affects Versions: 8.2
>            Reporter: kkewwei
>            Priority: Major
>
>  In  DefaultIndexingChain.processField()
> {code:java}
> if (fieldType.stored()) {
>   if (fp == null) {
>     fp = getOrAddField(fieldName, fieldType, false);
>   }
>   if (fieldType.stored()) {
>     String value = field.stringValue(); 
>     ......
>     try { 
>       storedFieldsConsumer.writeField(fp.fieldInfo, field);
>     } catch (Throwable th) {
>       ......
>     }
>   }
> }
> {code}
>  If there has need to add the second {{if}}, because {{fieldType.stored()}} 
> is executed before.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to