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

Question: retrieve_statement.py's findstmtrefs function, why? #189

Closed
MonkoftheFunk opened this issue Aug 15, 2013 · 2 comments
Closed

Question: retrieve_statement.py's findstmtrefs function, why? #189

MonkoftheFunk opened this issue Aug 15, 2013 · 2 comments

Comments

@MonkoftheFunk
Copy link

Hi, First off Thank you for building this, it has really been helpful, you guys did a lot of work.

So if the complex query already finds all the statements that match, wouldn't searching (and recursively searching) through statement refs. come up with same results? Thanks for the insight

# only find references when a filter other than
# since, until, or limit was used 
    if reffilter:
        stmtset = findstmtrefs(stmtset.distinct(), sinceq, untilq)
@creighton
Copy link
Contributor

Your comments are welcome. Especially with the statement retrieval code, which we are constantly trying to optimize.

If I remember correctly that block of code is trying to meet the search requirements in the spec (https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#filter-conditions-for-statementrefs) where it says the search criteria matches statements, and statements that reference matching statements.

So for example (and one of the statements I've used for testing), take statements: "tom hacked a computer" and "IT stopped [tom hacked a computer]". If I search for statements with tom as the actor, I should get both of those statements.

@MonkoftheFunk
Copy link
Author

Gotcha, that makes sense, should have read that part of the spec closer
Thanks again, again great work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants