mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-501: validate notes before update index
This commit is contained in:
parent
5f47890e71
commit
da69c07737
1 changed files with 12 additions and 1 deletions
|
|
@ -180,10 +180,21 @@ public class SearchService {
|
|||
}
|
||||
|
||||
private void updateIndexNoteName(Note note) throws IOException {
|
||||
updateDoc(note.getId(), note.getName(), null);
|
||||
String noteName = note.getName();
|
||||
String noteId = note.getId();
|
||||
LOG.debug("Indexing Notebook {}, '{}'", noteId, noteName);
|
||||
if (null == noteName || noteName.isEmpty()) {
|
||||
LOG.debug("Skipping empty notebook name");
|
||||
return;
|
||||
}
|
||||
updateDoc(noteId, noteName, null);
|
||||
}
|
||||
|
||||
private void updateIndexParagraph(Note note, Paragraph p) throws IOException {
|
||||
if (p.getText() == null) {
|
||||
LOG.debug("Skipping empty paragraph");
|
||||
return;
|
||||
}
|
||||
updateDoc(note.getId(), note.getName(), p);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue