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

No error on too many grams / unexpected behavior #107

Open
organisciak opened this issue Aug 21, 2016 · 2 comments
Open

No error on too many grams / unexpected behavior #107

organisciak opened this issue Aug 21, 2016 · 2 comments
Assignees
Labels

Comments

@organisciak
Copy link
Member

As mentioned in #105, querying for an ngram greater than the n that are indexed returns full summary statistics. This should give an error or, at the very least, return zeroes.

The error handling can be done with the new "method":"data", "format":"json" response type.

@organisciak organisciak self-assigned this Aug 21, 2016
@organisciak
Copy link
Member Author

Is there a already a way to recall the number of words that are indexed, or does it need a new method to check with the DB? I have a simple response here that raises an error if there are more than 2 words, but for unigram-only BW or event >2grams, the better version is to compare against the index parameters.

@bmschmidt
Copy link
Member

Currently there's no way to check. The ticket is open at #88.

I think this requires a whole new table in the MySQL database to use as a key-value store.

For short-term, the big question is what happens when you execute a bigram query on a unigram-only bookworm. I'm not sure, but there's probably some way to catch an error?

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

No branches or pull requests

2 participants