here is my web engine project it has problem build failed
Searcher.java
cannot find symbol method getLiveDocs(org.apache.lucene.index.DirectoryReader) fix it. here are all the files: crawler.java package com.example;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
import org.jsoup.nodes.Element;

import java.io.IOException;
import java.util.*;

public class Crawler {
    private Set<String> visitedUrls;
    private Queue<UrlDepthPair> queue;
    private int maxDepth;

    public Crawler(List<String> seedUrls, int maxDepth) {
        this.visitedUrls = Collections.synchronizedSet(new HashSet<>());
        this.queue = new LinkedList<>();
        this.maxDepth = maxDepth;
        for (String url : seedUrls) {
            queue.add(new UrlDepthPair(url, 0));
            visitedUrls.add(url);
        }
    }

    public List<WebPage> crawl() {
        List<WebPage> pages = Collections.synchronizedList(new ArrayList<>());
        while (!queue.isEmpty()) {
            UrlDepthPair current = queue.poll();
            if (current.depth > maxDepth) continue;

            try {
                Document doc = Jsoup.connect(current.url)
                        .userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) " +
                                "AppleWebKit/537.36 (KHTML, like Gecko) " +
                                "Chrome/58.0.3029.110 Safari/537.3")
                        .referrer("http://www.google.com")
                        .timeout(5000)
                        .get();
                String title = doc.title();
                String body = doc.body().text();
                pages.add(new WebPage(current.url, title, body));
                System.out.println("Crawled: " + current.url);

                // Extract and enqueue links
                Elements links = doc.select("a[href]");
                for (Element link : links) {
                    String absHref = link.attr("abs:href");
                    if (absHref.startsWith("http") && !visitedUrls.contains(absHref)) {
                        queue.add(new UrlDepthPair(absHref, current.depth + 1));
                        visitedUrls.add(absHref);
                    }
                }

                // Introduce a delay to prevent overwhelming the server
                Thread.sleep(1000); // 1-second delay
            } catch (IOException e) {
                System.err.println("Failed to crawl: " + current.url + " - " + e.getMessage());
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                System.err.println("Crawler was interrupted.");
            }
        }
        return pages;
    }

    private static class UrlDepthPair {
        String url;
        int depth;

        UrlDepthPair(String url, int depth) {
            this.url = url;
            this.depth = depth;
        }
    }
} indexer.java package com.example;

import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.*;
import org.apache.lucene.index.*;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;

import java.io.IOException;
import java.nio.file.Paths;
import java.util.List;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.Set;

public class Indexer {
    private static final String INDEX_DIR = "index";

    private Directory directory;
    private StandardAnalyzer analyzer;
    private IndexWriterConfig config;
    private IndexWriter writer;
    private Set<String> contentHashes;

    public Indexer() throws IOException {
        directory = FSDirectory.open(Paths.get(INDEX_DIR));
        analyzer = new StandardAnalyzer();
        config = new IndexWriterConfig(analyzer);
        writer = new IndexWriter(directory, config);
        contentHashes = new HashSet<>();
    }

    public void indexPages(List<WebPage> pages) throws IOException {
        for (WebPage page : pages) {
            if (!isDuplicate(page.getContent())) {
                addDoc(page);
            } else {
                System.out.println("Duplicate content found for URL: " + page.getUrl());
            }
        }
        writer.close();
    }

    private boolean isDuplicate(String content) {
        String hash = computeHash(content);
        if (contentHashes.contains(hash)) {
            return true;
        } else {
            contentHashes.add(hash);
            return false;
        }
    }

    private String computeHash(String content) {
        try {
            MessageDigest digest = MessageDigest.getInstance("SHA-256");
            byte[] hashBytes = digest.digest(content.getBytes(StandardCharsets.UTF_8));
            StringBuilder sb = new StringBuilder();
            for (byte b : hashBytes) {
                sb.append(String.format("%02x", b));
            }
            return sb.toString();
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException("SHA-256 algorithm not found.");
        }
    }

    private void addDoc(WebPage page) throws IOException {
        Document doc = new Document();
        doc.add(new StringField("url", page.getUrl(), Field.Store.YES));
        doc.add(new TextField("title", page.getTitle(), Field.Store.YES));
        doc.add(new TextField("content", page.getContent(), Field.Store.NO));
        writer.addDocument(doc);
    }
} main.java package com.example;

import org.apache.lucene.document.Document;
import org.apache.lucene.queryparser.classic.ParseException;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.TopDocs;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        // Step 1: Define seed URLs and crawling depth
        List<String> seedUrls = Arrays.asList(
                "https://www.example.com",
                "https://www.wikipedia.org",
                "https://www.openai.com" // This will likely fail with a 403 error
        );
        int maxDepth = 1; // Adjust based on your requirements

        // Step 2: Crawl the web pages
        Crawler crawler = new Crawler(seedUrls, maxDepth);
        List<WebPage> pages = crawler.crawl();

        // Step 3: Index the crawled pages
        try {
            Indexer indexer = new Indexer();
            indexer.indexPages(pages);
        } catch (IOException e) {
            System.err.println("Indexing failed: " + e.getMessage());
            return;
        }

        // Step 4: List all indexed documents for verification (optional)
        try {
            Searcher searcher = new Searcher();
            System.out.println("Indexed Documents:");
            List<WebPage> indexedPages = searcher.listAllDocuments();
            for (int i = 0; i < indexedPages.size(); i++) {
                WebPage page = indexedPages.get(i);
                System.out.println("Document " + i + ":");
                System.out.println("URL: " + page.getUrl());
                System.out.println("Title: " + page.getTitle());
                System.out.println("---------------------------");
            }
            searcher.close();
        } catch (IOException e) {
            System.err.println("Error listing documents: " + e.getMessage());
        }

        // Step 5: Search the index
        try {
            Searcher searcher = new Searcher();
            Scanner scanner = new Scanner(System.in);
            while (true) {
                System.out.print("Enter search query (or 'exit' to quit): ");
                String query = scanner.nextLine();
                if (query.equalsIgnoreCase("exit")) {
                    break;
                }
                TopDocs results = searcher.search(query, 10);
                System.out.println("Found " + results.totalHits.value + " hits.");
                for (ScoreDoc sd : results.scoreDocs) {
                    Document doc = searcher.getDocument(sd.doc);
                    System.out.println("URL: " + doc.get("url"));
                    System.out.println("Title: " + doc.get("title"));
                    System.out.println("Score: " + sd.score);
                    System.out.println("---------------------------");
                }
            }
            scanner.close();
            searcher.close();
        } catch (IOException | ParseException e) {
            System.err.println("Search failed: " + e.getMessage());
        }
    }
} searcher.java package com.example;

import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.MultiFields;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.queryparser.classic.ParseException;
import org.apache.lucene.queryparser.classic.QueryParser;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.util.Bits;

import java.io.IOException;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

public class Searcher {
    private static final String INDEX_DIR = "index";

    private IndexSearcher searcher;
    private QueryParser parser;
    private DirectoryReader reader;

    public Searcher() throws IOException {
        Directory directory = FSDirectory.open(Paths.get(INDEX_DIR));
        reader = DirectoryReader.open(directory);
        searcher = new IndexSearcher(reader);
        parser = new QueryParser("content", new StandardAnalyzer());
    }

    public TopDocs search(String queryStr, int maxHits) throws IOException, ParseException {
        Query query = parser.parse(queryStr);
        return searcher.search(query, maxHits);
    }

    public Document getDocument(int docId) throws IOException {
        return searcher.doc(docId);
    }

    public List<WebPage> listAllDocuments() throws IOException {
        List<WebPage> pages = new ArrayList<>();
        Bits liveDocs = MultiFields.getLiveDocs(reader);
        for (int i = 0; i < reader.maxDoc(); i++) {
            if (liveDocs == null || liveDocs.get(i)) { // liveDocs is null if no deletions
                Document doc = searcher.doc(i);
                pages.add(new WebPage(doc.get("url"), doc.get("title"), ""));
            }
        }
        return pages;
    }

    public void close() throws IOException {
        reader.close();
    }
} webpage.java package com.example;

public class WebPage {
    private String url;
    private String title;
    private String content;

    public WebPage(String url, String title, String content) {
        this.url = url;
        this.title = title;
        this.content = content;
    }

    // Getters
    public String getUrl() {
        return url;
    }

    public String getTitle() {
        return title;
    }

    public String getContent() {
        return content;
    }
} pom.xml <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                             http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.example</groupId>
  <artifactId>WebSearchEngine</artifactId>
  <version>1.0-SNAPSHOT</version>

  <dependencies>
    <!-- JSoup for HTML parsing -->
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
      <version>1.15.3</version>
    </dependency>

    <!-- Apache Lucene Core -->
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-core</artifactId>
      <version>8.11.1</version>
    </dependency>

    <!-- Apache Lucene Analyzer -->
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-analyzers-common</artifactId>
      <version>8.11.1</version>
    </dependency>

    <!-- Apache Lucene Query Parser -->
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-queryparser</artifactId>
      <version>8.11.1</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- Maven Compiler Plugin to specify Java version -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>11</source> <!-- Ensure this matches your installed JDK version -->
          <target>11</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project> fix the problem and show all changed files whole