File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
api/src/main/java/io/kafbat/ui/service/index Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1515import java .util .concurrent .locks .ReentrantReadWriteLock ;
1616import java .util .function .Function ;
1717import java .util .stream .Collectors ;
18+ import lombok .extern .slf4j .Slf4j ;
1819import org .apache .lucene .analysis .Analyzer ;
1920import org .apache .lucene .document .Document ;
2021import org .apache .lucene .document .Field ;
4041import org .apache .lucene .store .ByteBuffersDirectory ;
4142import org .apache .lucene .store .Directory ;
4243
44+ @ Slf4j
4345public class LuceneTopicsIndex implements TopicsIndex {
4446 public static final String FIELD_NAME_RAW = "name_raw" ;
4547
@@ -74,9 +76,15 @@ private Directory build(List<InternalTopic> topics) {
7476 doc .add (new LongPoint (FIELD_SIZE , topic .getSegmentSize ()));
7577 if (topic .getTopicConfigs () != null && !topic .getTopicConfigs ().isEmpty ()) {
7678 for (InternalTopicConfig topicConfig : topic .getTopicConfigs ()) {
77- if (topicConfig .getName () != null || topicConfig .getValue () != null ) {
79+ final String topicConfigValue = topicConfig .getValue ();
80+ if (topicConfigValue != null ) {
7881 doc .add (new StringField (FIELD_CONFIG_PREFIX + "_" + topicConfig .getName (), topicConfig .getValue (),
7982 Field .Store .NO ));
83+ } else {
84+ log .info (
85+ "Topic configuration item '{}' on internal topic '{}' has an unexpected value of null"
86+ + "; skipping processing" , topicConfig .getName (), topic .getName ()
87+ );
8088 }
8189 }
8290 }
You can’t perform that action at this time.
0 commit comments