---
title: "Lucene常用方法收藏"
author: "xplazy"
date: "2008-07-07T11:53:22Z"
tags: []
slug: "lucene"
draft: false
lastmod: "2008-07-07T11:53:22Z"
id: 212277
url: "https://xplazy.iteye.com/blog/212277"
---

1.判断是否存在Lucene索引文件

 

```
static org.apache.lucene.index.IndexReader.indexExists(String directory);
static org.apache.lucene.index.IndexReader.indexExists(File directory); 
static org.apache.lucene.index.IndexReader.indexExists(Directory directory);
```