Skip to content

Commit

Permalink
Removing dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Meghdut-Mandal committed Jan 17, 2021
1 parent c1a4066 commit 969bf59
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,7 @@ public static void main(String[] args) throws IOException


}


public static void mainx(String[] args)
{
List<Document> documents = new ArrayList<>();
documents.add(new Document("the total number of documents by the sexy newton of documents containing the term, and then taking the logarithm of that quotient", 1));
documents.add(new Document("A formula that aims to define the importance of a keyword or phrase within a document or a web page", 2));
documents.add(new Document("to the more meaningful terms brown newton cow ", 3));
documents.add(new Document("ccurs in each document; the number of times a term in keyword a document is called its term frequency.", 4));

TextSearchIndex index = SearchIndexFactory.buildIndex(documents);

String searchTerm = "total number of documents";

var batch = index.search(searchTerm);
batch.forEach(item -> System.out.println(item.getUniqueIdentifier() + " -- " + item.getRelevanceScore()));

}


@Override
public String readLine()
Expand Down

0 comments on commit 969bf59

Please sign in to comment.