VIBE v5.1.6
Search Engine
|
Public Member Functions | |
QueryProcessor (InvertedIndex invertedIndex, boolean partial) | |
QueryProcessor (InvertedIndex invertedIndex) | |
void | parseQuery (String query) |
void | toJson (Path path) throws IOException |
String | toString () |
List< InvertedIndex.Score > | getScores (String query) |
Set< String > | getQueries () |
Public Member Functions inherited from edu.usfca.cs272.Processor | |
default void | parseQuery (Path query) throws IOException |
default int | numOfResults () |
default int | numOfScores (String query) |
default boolean | hasQuery (String query) |
Single threaded query processor.
edu.usfca.cs272.QueryProcessor.QueryProcessor | ( | InvertedIndex | invertedIndex, |
boolean | partial ) |
Creates a new query processor.
invertedIndex | The index to be searched. |
partial | true if partial search is to be performed. |
edu.usfca.cs272.QueryProcessor.QueryProcessor | ( | InvertedIndex | invertedIndex | ) |
Creates a new Query Processor that always executes an exact search.
invertedIndex | index to be searched |
Set< String > edu.usfca.cs272.QueryProcessor.getQueries | ( | ) |
List< InvertedIndex.Score > edu.usfca.cs272.QueryProcessor.getScores | ( | String | query | ) |
Returns the scores for a query.
query | the query for which to return scores. |
Implements edu.usfca.cs272.Processor.
void edu.usfca.cs272.QueryProcessor.parseQuery | ( | String | query | ) |
void edu.usfca.cs272.QueryProcessor.toJson | ( | Path | path | ) | throws IOException |
Writes the search results in pretty Json to file path.
path | the path of the file. |
IOException | if the file is not found. |
Implements edu.usfca.cs272.Processor.