Skip to content

Conversation

@mnunberg
Copy link
Contributor

No description provided.

- Ensure test files are relative to test source - Don't die if index being dropped doesn't already exist
self._ids = ids
return self

def returning(self, *fields):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to return_fields please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

test/test.py Outdated


for doc in client.search(Query('henry king').returning('play', 'nonexist')).docs:
doc.nonexist
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no assertion here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is deliberate. I'm unsure what exactly would be included in the field, but I could be sure that trying to access this field would not result in an exception (e.g. AttributeError)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you do know that doc.nonexist should be None and that doc.play should have content in it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done



class SuggestionParser(object):
def __init__(self, with_scores, with_payloads, ret):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add docstring detailing what this does please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mnunberg
Copy link
Contributor Author

Changes addressed/fixed.

mnunberg added 2 commits July 11, 2017 15:37
This adds a `returning()` builder method
@dvirsky dvirsky merged commit ce69062 into RediSearch:master Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants