Searching indexed data with Apache Lucene
Now that you have indexed your data, you will be searching the data using Apache Lucene in this recipe. The code for searching in this recipe depends on the index that you created in the previous recipe, and therefore, it will only successfully execute if you followed the instructions in the previous recipe.
Getting ready
Complete the previous recipe. After completing the previous recipe, go to the index directory in your project that you created in step 11 of that recipe. Make sure that you see some indexing files there:

Create a Java file named
SearchFilesin theorg.apache.lucene.demopackage you created in the previous recipe:
Now you are ready to type in some code in the
SearchFiles.javafile.
How to do it...
Open
SearchFiles.javain the editor of Eclipse and create the following class:public class SearchFiles {You need to create two constant String variables. The first variable will contain the path of your
indexthat you created...