Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set proper default traversals #1859

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion jina/drivers/querylang/reverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ReverseQL(QuerySetReader, BaseRecursiveDriver):
will reverse the order of the documents returned by the `Chunk2DocRankerDriver` before sending them to the next `Pod`
"""

def __init__(self, traversal_paths: Tuple[str] = ('c',), *args, **kwargs):
def __init__(self, traversal_paths: Tuple[str] = ('r',), *args, **kwargs):
super().__init__(traversal_paths=traversal_paths, *args, **kwargs)

def _apply_all(self, docs: 'DocumentSet', *args, **kwargs) -> None:
Expand Down
2 changes: 1 addition & 1 deletion jina/drivers/querylang/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ExcludeQL(QuerySetReader, BaseRecursiveDriver):
ExcludeQL will avoid `buffer` and `chunks` fields to be sent to the next `Pod`
"""

def __init__(self, fields: Union[Tuple, str], traversal_paths: Tuple[str] = ('c',), *args, **kwargs):
def __init__(self, fields: Union[Tuple, str], traversal_paths: Tuple[str] = ('r',), *args, **kwargs):
"""

:param fields: the pruned field names in tuple
Expand Down
2 changes: 1 addition & 1 deletion jina/drivers/querylang/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SortQL(QuerySetReader, BaseRecursiveDriver):
`SortQL` will ensure that only the documents are sorted by the score value before slicing the first top 50 documents
"""

def __init__(self, field: str, reverse: bool = False, traversal_paths: Tuple[str] = ('c',), *args, **kwargs):
def __init__(self, field: str, reverse: bool = False, traversal_paths: Tuple[str] = ('r',), *args, **kwargs):
"""
:param field: the value of the field drives the sort of the iterable docs
:param reverse: sort the value from big to small
Expand Down