Browse Source

调整下代码结构

research/10.0
alex.sung 6 years ago
parent
commit
3d6bd5f7e2
  1. 5
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

5
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

@ -113,10 +113,11 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
*/
private void initReader() {
try {
if(indexWriter != null){
if(indexWriter == null){
directory = FSDirectory.open(new File(path));
}else{
indexWriter.close();
}
directory = FSDirectory.open(new File(path));
indexReader = DirectoryReader.open(directory);
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);

Loading…
Cancel
Save