private void indexFile(@NotNull File file)  {
        try {
            Scanner scanner = new Scanner(file);
            int coordinate = 0;
            while (scanner.hasNextLine()) {
                String line = scanner.nextLine();
                line = line.replaceAll("\\?", "");

                String[] words = line.split("\\|");

                final int c = coordinate;
                Arrays.stream(words).forEach(w -> index.indexTerm(new TermImpl(w), new CoordinateDocument(file, c)));

                coordinate++;
            }
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
    }