
The above IA (base) should not trigger for this query. This is because of the handle function on line 34.
The handle function needs to be replaced with another - one that is more appropriate. You can consult the documentation further on the available handle functions.
Instant Answer Page: https://duck.co/ia/view/base
@pjhampton What is the expected result for that query?
@mintsoft it shouldn't trigger this IA. Dealing with this query will most likely become it's own IA (for a separate issue). I'm not married to this idea though. If people think it's better to extend this then I'm fine with that too.
@pjhampton What is the expected result for that query?
@mintsoft based on https://answers.yahoo.com/question/index?qid=20091203074128AA2UwNK, I think the user might expect to see 0.0001 as the answer?
Anyway, the issue here is more that Base.pm is incorrectly triggering on that query, because it's using query_clean which is a little dangerous, as it means we ignore . and % in the query, which have significant meaning
@mintsoft based on https://answers.yahoo.com/question/index?qid=20091203074128AA2UwNK, I think the user might expect to see 0.0001 as the answer?
Ah! It never even occurred to me that the user was asking for 0.01% expressed as a decimal (i.e. 1 is 100%)
Hey guys,
Is anyone working on this? Though at this moment I am unsure about what needs to be done, I would like to try. @mintsoft @pjhampton
@adv16 Go for it! Basically the Base IA shouldn't return a result for this query. For me the first step is to add a test like : '0.01 % in decimal' => undef, into the Base.t and then make the test pass 馃憤
Thanks for this inputs @mintsoft @pjhampton @moollaza .. I could make the newly added test case pass just by changing the handle to query_lc so that it allows non alphanumeric characters and the IA does't trigger anymore..
But I am not fully convinced with this..it feels like a lot of hard coding in the IA.. Also this IA somehow assumes that we are never going to get floating point numbers in the query.. so even after allowing the non-alphanumeric characters it will not even provide results for queries like "0.2 in decimal".. Any thoughts on what should be done about this?
@adv16 Can you open a PR for the changes? We'll discuss the solution etc in there
PR #4010 opened. Please have a look. Thanks.
Most helpful comment
@mintsoft based on https://answers.yahoo.com/question/index?qid=20091203074128AA2UwNK, I think the user might expect to see
0.0001as the answer?Anyway, the issue here is more that Base.pm is incorrectly triggering on that query, because it's using
query_cleanwhich is a little dangerous, as it means we ignore.and%in the query, which have significant meaning