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

add VectorialQuery class

parent a2cc48eb
from gogole.query.query import Query
from gogole.query.boolean_query import BooleanQuery
from gogole.query.vectorial_query import VectorialQuery
QUERY_TYPE_BOOLEAN = 'boolean'
QUERY_TYPE_VECTORIAL = 'vectorial'
QUERY_MAP = {
QUERY_TYPE_BOOLEAN: BooleanQuery
QUERY_TYPE_BOOLEAN: BooleanQuery,
QUERY_TYPE_VECTORIAL: VectorialQuery
}
class BooleanQuery:
from gogole.query import Query
class BooleanQuery(Query):
OPERATOR_AND = ' and '
OPERATOR_OR = ' or '
OPERATOR_NOT = ' not '
def __init__(self, collection):
self.collection = collection
def search_documents(self, query):
# Assume the expression
# is in the conjunctive normal form
......
from gogole.query import Query
class VectorialQuery(Query):
def search(self, query):
print('coucou')
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