{"action":"created","issue":{"url":"https://api.github.com/repos/josiahcarlson/rom/issues/102","repository_url":"https://api.github.com/repos/josiahcarlson/rom","labels_url":"https://api.github.com/repos/josiahcarlson/rom/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/josiahcarlson/rom/issues/102/comments","events_url":"https://api.github.com/repos/josiahcarlson/rom/issues/102/events","html_url":"https://github.com/josiahcarlson/rom/issues/102","id":193307120,"number":102,"title":"`startwith` does not honour the `FULL_TEXT` behaviour","user":{"login":"slorg1","id":5043518,"avatar_url":"https://avatars.githubusercontent.com/u/5043518?v=3","gravatar_id":"","url":"https://api.github.com/users/slorg1","html_url":"https://github.com/slorg1","followers_url":"https://api.github.com/users/slorg1/followers","following_url":"https://api.github.com/users/slorg1/following{/other_user}","gists_url":"https://api.github.com/users/slorg1/gists{/gist_id}","starred_url":"https://api.github.com/users/slorg1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slorg1/subscriptions","organizations_url":"https://api.github.com/users/slorg1/orgs","repos_url":"https://api.github.com/users/slorg1/repos","events_url":"https://api.github.com/users/slorg1/events{/privacy}","received_events_url":"https://api.github.com/users/slorg1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-12-03T18:59:04Z","updated_at":"2016-12-13T06:20:12Z","closed_at":"2016-12-06T06:31:38Z","body":"Hi,\r\n\r\nI am sorry to bug you again so soon ;-)\r\n\r\nI am testing it out a column having `FULL_TEXT` set as a keygen.\r\n\r\nThe symptom I get is that if I search something like `a` it is going to find the word `apple` nicely.\r\nHowever, if I search for `a a` or `an a` it is not going to find `an apple`.\r\n\r\nFrom what I can tell, the issue is that the `FULL_TEXT` function which produces a list of \"tokens\" is not used by `Query._check` (L66). The `.lower()` emulates / duplicates some of that.\r\n\r\nI do not know how hard it would be, it seems to me like `Query._check` should run the `rom.util.*` functions (`FULL_TEXT, SIMPLE_CI, CASE_INSENSITIVE or IDENTITY_CI`). It would allow for the code to be better centralised (no duplication) and to ease the addition of a new keygen. Then `Query._check` would either return the list of tokens or yield them one at the time. Finally, in any of the `startwith`, `endwith` etc. instead of adding 1 `Pattern` per input value, it could append 1 pattern per token generated by `Query._check`.\r\n\r\nThis is only a suggestion to fix the issue that I found. I am not sure that it is the only way or even the right way. You would know that better than I would.\r\n\r\nThank you in advance."},"comment":{"url":"https://api.github.com/repos/josiahcarlson/rom/issues/comments/266656823","html_url":"https://github.com/josiahcarlson/rom/issues/102#issuecomment-266656823","issue_url":"https://api.github.com/repos/josiahcarlson/rom/issues/102","id":266656823,"user":{"login":"josiahcarlson","id":209346,"avatar_url":"https://avatars.githubusercontent.com/u/209346?v=3","gravatar_id":"","url":"https://api.github.com/users/josiahcarlson","html_url":"https://github.com/josiahcarlson","followers_url":"https://api.github.com/users/josiahcarlson/followers","following_url":"https://api.github.com/users/josiahcarlson/following{/other_user}","gists_url":"https://api.github.com/users/josiahcarlson/gists{/gist_id}","starred_url":"https://api.github.com/users/josiahcarlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josiahcarlson/subscriptions","organizations_url":"https://api.github.com/users/josiahcarlson/orgs","repos_url":"https://api.github.com/users/josiahcarlson/repos","events_url":"https://api.github.com/users/josiahcarlson/events{/privacy}","received_events_url":"https://api.github.com/users/josiahcarlson/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T06:20:12Z","updated_at":"2016-12-13T06:20:12Z","body":"I don't understand what you want or what you are trying to say, Your paragraph above is completely incomprehensible.\r\n\r\nI'm not changing the library for the reasons I have already provided (inconsistent behavior between arguments/types/methods). Further, not a single database or library I have ever *used and respected* parses queries as you describe. Not to say that such languages/libraries don't exist, I'm just saying that *I* don't respect them. And if I don't respect them, I sure as hell am not going to emulate them. I will not be responding to this thread again."}}
{"actor":{"display_login":"josiahcarlson"}}