| |
- execute_query(query, trie)
- Method executes normal search query and returns proper data structures
:param query: input string
:param trie: populated trie
:return: positive_query: string with searched words(excluding words after NOT operator)
hard_result_set: dict with file paths that satisfies constraints in query as keys and numbers of
appearances for every searched word in positive_query
broad_positive_res_set: dict with file paths as keys and numbers of appearances for every searched word
present in positive_query (sites present in hard_result_set are not included)
- get_correct_query(input_query: str)
- Ignoring multiple whitespaces in input string
:param input_query: string
:return: same query with 1 whitespace between words
- validate_query(query: str)
- Checking validation for normal(not advanced) search
:param query: input query for normal(not advanced) search
:return: True if query is valid
|