Browse Source

Merge pull request #593 in DESIGN/design from ~ALEX.SUNG/design:feature/10.0 to feature/10.0

REPORT-12582 @Alex.Sung:AlphaFine本地常用问题

* commit '3d6bd5f7e201dab07382bdb203c8c087ff44fa38':
  调整下代码结构
  REPORT-12582 @Alex.Sung:AlphaFine本地常用问题 之前的本地常用功能,没有考虑到重启场景,需要判空后再处理。
research/10.0
Alex.Sung 6 years ago
parent
commit
eef8e690db
  1. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

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

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

Loading…
Cancel
Save