Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Framework
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Apr 2015 at 09:50 UTC
Updated:
2 May 2015 at 10:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ekes commentedD7 relied on falling through the switch cases from text to token where strings were shortened, with a log message.
D8 the fall through was removed: b00c4ce "Tokenizing is not working as expected after adding the HTML filter to the chain in the DB tests".
Patch adds a check within text case for 50 characters, and truncates.
Comment #2
ekes commentedComment #3
drunken monkeyThanks for the patch!
Your solution seems to make sense, at least as long as the initial decision to remove the fall-through was really correct/necessary. So, I'll commit it.
However, why did you create a new method on the test, not just use the existing
regressionTests2()method? (Also, the doc comment would be missing if it's necessary.)The attached patch would change that (and also removes a stranded newline in your patch).
Comment #4
nick_vhAre we allowed to use the mb_strcut here? Didn't I just see an issue we should not rely on the mb extension?
Comment #5
ekes commentedMB extension I made a separate issue. There are more instances, so this is consistent with present, and add the test first.
I made a separate test because the 1 and 2 are logical units testing particular activity; only the HTML filter test switches body indexing on and off; so this is a test with body indexing on.
Comment #6
drunken monkeyOK, would make sense I guess, but I think I like it more like this, just having the regression tests split in groups based on when they should run, not along other lines as well.
Also, wouldn't it work just as well to test with the long word in the "name" property?
Comment #7
ekes commentedFor the test it needs to be Fulltext indexed, and able to be 50 chars. entity_test name is varchar(32). So body is easiest.
As the MB patch has landed first, I've updated this to work with Unicode::truncateBytes().
Comment #8
drunken monkeyOK, thanks!
And true, of course, didn't think about that. Good work!
Test bot is happy, too, so: committed.
Thanks again!