mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-501: refactoring, renames + verbose logging ON
This commit is contained in:
parent
36b2467b0a
commit
b0b2c54e2d
1 changed files with 8 additions and 7 deletions
|
|
@ -221,13 +221,13 @@ public class SearchService {
|
|||
*/
|
||||
void indexDocs(final IndexWriter writer, Collection<Note> notes) throws IOException {
|
||||
for (Note note : notes) {
|
||||
indexDoc(writer, note.getId(), note.getName());
|
||||
indexNoteName(writer, note.getId(), note.getName());
|
||||
for (Paragraph doc : note.getParagraphs()) {
|
||||
if (doc.getText() == null) {
|
||||
LOG.debug("Skipping empty paragraph");
|
||||
LOG.info("Skipping empty paragraph");
|
||||
continue;
|
||||
}
|
||||
indexDoc(writer, note.getId(), note.getName(), doc);
|
||||
indexParagraph(writer, note.getId(), note.getName(), doc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -236,10 +236,10 @@ public class SearchService {
|
|||
* Indexes a notebook name
|
||||
* @throws IOException
|
||||
*/
|
||||
private void indexDoc(IndexWriter w, String noteId, String noteName) throws IOException {
|
||||
LOG.debug("Indexing Notebook {}, '{}'", noteId, noteName);
|
||||
private void indexNoteName(IndexWriter w, String noteId, String noteName) throws IOException {
|
||||
LOG.info("Indexing Notebook {}, '{}'", noteId, noteName);
|
||||
if (null == noteName || noteName.isEmpty()) {
|
||||
LOG.debug("Skipping empty notebook name");
|
||||
LOG.info("Skipping empty notebook name");
|
||||
return;
|
||||
}
|
||||
Document doc = newDocument(noteId, noteName);
|
||||
|
|
@ -249,7 +249,8 @@ public class SearchService {
|
|||
/**
|
||||
* Indexes a single paragraph = document
|
||||
*/
|
||||
void indexDoc(IndexWriter w, String noteId, String noteName, Paragraph p) throws IOException {
|
||||
void indexParagraph(IndexWriter w, String noteId, String noteName, Paragraph p)
|
||||
throws IOException {
|
||||
Document doc = newDocument(noteId, noteName, p);
|
||||
w.addDocument(doc);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue