[ https://issues.apache.org/jira/browse/LUCENE-8945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930289#comment-16930289 ]
Tomoko Uchida commented on LUCENE-8945: --------------------------------------- Hi, the patch works for me :) I'd like to suggest a few things: - Can you add a public static method to {{Delimiter}} enum to resolve the instance by their description and just call it from the dialog factory, so that you don't have to expose internal String literals such as "Comma"? More concretely, I think the switch statement in {{ExportTermsDialogFactory#getSelectedDelimiterValue(String delimiter)}} should be moved to {{Delimiter}} itself (and the String literals shouldn't be repeated). - The right place for those lines is the constructor {{ExportTermsDialogFactory()}}, not {{Observer#openIndex()}}. (The latter is called _every time_ you open an index.) {code:java} Stream.of(Delimiter.values()).forEachOrdered(delimiterVal -> delimiterCombo.addItem(delimiterVal.getDescription())); delimiterCombo.setSelectedItem(COMMA.getDescription());//Set default delimiter {code} - Just for clarification, can we use "Whitespace" as the option name instead of "Space"? > Allow to change the output file delimiter on Luke "export terms" feature > ------------------------------------------------------------------------ > > Key: LUCENE-8945 > URL: https://issues.apache.org/jira/browse/LUCENE-8945 > Project: Lucene - Core > Issue Type: Improvement > Components: modules/luke > Reporter: Tomoko Uchida > Priority: Minor > Attachments: LUCENE-8945.patch, delimiter_comma_exported_file.PNG, > delimiter_space_exported_file.PNG, delimiter_tab_exported_file.PNG, > luke_export_delimiter.png > > > This is a follow-up issue for LUCENE-8764. > Current delimiter is fixed to "," (comma), but terms also can include comma > and they are not escaped. It would be better if the delimiter can be > changed/selected to a tab or whitespace when exporting. -- This message was sent by Atlassian Jira (v8.3.2#803003) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org