VIBE v5.1.6
Search Engine
|
Public Member Functions | |
ThreadSafeQueryProcessor (ThreadSafeInvertedIndex index, WorkQueue queue, boolean partialSearch) | |
void | parseQuery (Path query) throws IOException |
void | toJson (Path path) throws IOException |
int | numOfResults () |
List< InvertedIndex.Score > | getScores (String query) |
Set< String > | getQueries () |
void | parseQuery (String query) |
String | toString () |
Public Member Functions inherited from edu.usfca.cs272.Processor | |
default int | numOfScores (String query) |
default boolean | hasQuery (String query) |
Thread-safe variation of the Processor
edu.usfca.cs272.ThreadSafeQueryProcessor.ThreadSafeQueryProcessor | ( | ThreadSafeInvertedIndex | index, |
WorkQueue | queue, | ||
boolean | partialSearch ) |
Creates a new ThreadSafeQueryProcessor
index | the thread safe invertedindex to search through. |
queue | the workqueue to use. |
partialSearch | true if partial search needs to be performed. |
Set< String > edu.usfca.cs272.ThreadSafeQueryProcessor.getQueries | ( | ) |
List< InvertedIndex.Score > edu.usfca.cs272.ThreadSafeQueryProcessor.getScores | ( | String | query | ) |
Returns the scores for a query.
query | the query for which to return scores. |
Implements edu.usfca.cs272.Processor.
int edu.usfca.cs272.ThreadSafeQueryProcessor.numOfResults | ( | ) |
Returns the number of queries for which there is a result.
Implements edu.usfca.cs272.Processor.
void edu.usfca.cs272.ThreadSafeQueryProcessor.parseQuery | ( | Path | query | ) | throws IOException |
Reads a file containing queries to parse the queries within.
query | the file containing the queries. |
IOException | if the file is not found. |
Implements edu.usfca.cs272.Processor.
void edu.usfca.cs272.ThreadSafeQueryProcessor.parseQuery | ( | String | query | ) |
void edu.usfca.cs272.ThreadSafeQueryProcessor.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.