Commit a2cc48eb authored by Dos Santos David's avatar Dos Santos David

add -b and -v shortcuts

parent b1897d83
......@@ -21,8 +21,10 @@ You don't know where to start ? Let me help you !
* index lookup <token> : I'll tell you in where documents your token is
* search <query> : I'll show you the documents you need
search --boolean <query> Your query must be in the Conjunctive normal form
search -b,--boolean <query> Your query must be in the Conjunctive normal form
Like "a OR b OR c AND d" is "(a OR b OR c) AND d"
* search -v,--vectorial <query> : Search using the vectorial model
"""
......@@ -58,8 +60,8 @@ def build_cli_index_parser(root_parser):
def build_cli_search_parser(root_parser):
search_parser = root_parser.add_parser('search', description='search for documents')
search_parser.add_argument('--boolean', action='store_const', const='boolean', dest='search_query_type', help="use the booolean model")
search_parser.add_argument('--vectorial', action='store_const', const='vectorial', dest='search_query_type', help="use the vectorial model")
search_parser.add_argument('-b', '--boolean', action='store_const', const='boolean', dest='search_query_type', help="use the booolean model")
search_parser.add_argument('-v', '--vectorial', action='store_const', const='vectorial', dest='search_query_type', help="use the vectorial model")
search_parser.add_argument('query', help="your query", nargs='*')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment