private synchronized void initQueryBuilder() throws IOException {
        if (queryBuilder == null) {
            indexReader = DirectoryReader.open(indexDirectory);
            indexSearcher = new IndexSearcher(indexReader);
            queryBuilder = new QueryBuilder(writer.getAnalyzer());
        }
    }
private synchronized void initQueryBuilder ( ) throws IOException { if ( queryBuilder == null ) { indexReader = DirectoryReader . open ( indexDirectory ) ; indexSearcher = new IndexSearcher ( indexReader ) ; queryBuilder = new QueryBuilder ( writer . getAnalyzer ( ) ) ; } }
Performs a delayed initialization of the query builder to ensure that the index has been
fully created.

@throws IOException Unspecified IO exception.