Skip to content

Commit

Permalink
fix: set proper default traversals (#1859)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanFM committed Feb 4, 2021
1 parent d9dabdf commit 5c07c3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jina/drivers/querylang/reverse.py
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
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
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

0 comments on commit 5c07c3e

Please sign in to comment.