Skip to content

Commit

Permalink
add file empty
Browse files Browse the repository at this point in the history
  • Loading branch information
madneal committed Nov 13, 2017
1 parent b8d5495 commit 865000c
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 6 deletions.
Binary file added lib/poi-3.16.jar
Binary file not shown.
Binary file added lib/poi-ooxml-3.16.jar
Binary file not shown.
Binary file added lib/poi-ooxml-schemas-3.16.jar
Binary file not shown.
Binary file added lib/xlsx-streamer-1.2.0.jar
Binary file not shown.
6 changes: 1 addition & 5 deletions search/src/main/java/index/BaseIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.Term;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.util.List;

public class BaseIndex {

private static final Logger logger = LoggerFactory.getLogger(BaseIndex.class);
private static void indexDocs(IndexWriter writer, List<FileBean> t) throws Exception{
for (FileBean t2 : t) {
indexDoc(writer, t2);
Expand All @@ -42,7 +38,7 @@ public static void runIndex(List<FileBean> list) throws Exception {
CommonConstants.writer = IndexUtil.getIndexWriter(CommonConstants.INDEX_FILE_PATH, false);
indexDocs(CommonConstants.writer, list);
} catch (IOException e) {
logger.error("exception in runIndex:", e);
e.printStackTrace();
} finally {
try {
CommonConstants.writer.commit();
Expand Down
Binary file modified search/target/classes/index/BaseIndex.class
Binary file not shown.
2 changes: 1 addition & 1 deletion ui/src/main/java/controller/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void getSearchTextChanged(InputMethodEvent event) {
}

public void getKeyTyped(KeyEvent keyEvent) {
if ("\b".equals(keyEvent.getCharacter())) {
if ("\b".equals(keyEvent.getCharacter()) && !searchText.isEmpty()) {
searchText = searchText.substring(0, searchText.length() - 1);
} else {
if (!keyEvent.getCharacter().contains("\\")) {
Expand Down

0 comments on commit 865000c

Please sign in to comment.