[ https://issues.apache.org/jira/browse/LUCENE-8805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16843931#comment-16843931 ]
Adrien Grand commented on LUCENE-8805: -------------------------------------- I like how passing a String to stringField makes the API simpler. I'm less enthusiastic about using a BytesRef instead of a byte[] for binary fields. I could see the benefit if this allowed reusing the byte[], but otherwise it makes the API more complicated with no benefit? > Parameter changes for binaryField() and stringField() in StoredFieldVisitor > --------------------------------------------------------------------------- > > Key: LUCENE-8805 > URL: https://issues.apache.org/jira/browse/LUCENE-8805 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Namgyu Kim > Priority: Major > Attachments: LUCENE-8805.patch > > > I wrote this patch after seeing the comments left by [~mikemccand] when > SortingStoredFieldsConsumer class was first created. > {code:java} > @Override > public void binaryField(FieldInfo fieldInfo, byte[] value) throws IOException > { > ... > // TODO: can we avoid new BR here? > ... > } > @Override > public void stringField(FieldInfo fieldInfo, byte[] value) throws IOException > { > ... > // TODO: can we avoid new String here? > ... > } > {code} > I changed two things. > 1) change binaryField() parameters from byte[] to BytesRef. > 2) change stringField() parameters from byte[] to String. > I also changed the related contents while doing the work. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org