Search problems
Closed this issue · 10 comments
How are you able to search for "test"? None of the search indexes, which are all fulltext, should find the word "test" because it's too common, and an ignore word as well.
In a vanilla QI install I can't search for anything in any of the test posts because of fulltext's restrictions on common and frequently used words. So I can only search for words in the default welcome post, and in those, the results are not malformed:
So, what are yoy doing different?:)
OK, well I set the common word search setting off, and deleted and recreated the search index and now I see it too... But not really sure what to do about it. Don't really care about it, but also I only created the problem by messing with the forum itself, not QI, so, maybe it's more of a phpBB thing.
Click on "search user's posts" from the profile of a tester_xx, to reproduce.
That's on a fresh QI's install.
The solution, I mean is not an hack nor code, it is shortening the string in $lorem_ipsum. Then the new installation will not have such issue.
$lorem_ipsum = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.';
Well, trying to shorten it to a point where the results are not truncated isn't really solving it.
But it's only an issue with the pre-populated fake posts so not a big deal at all IMO.
More a workaround than a solution indeed. After 2 hours of code reading / attempts I gave up though.
And yes, not a big deal.
I see why this is happening. No clue how to deal with it though, as it's rooted in how phpBB works.
It's because all the posts created have no BBCODE_UID. But they have no BBCODE_UID because generate_text_for_storage
won't create one for them.
But, if I go in my database, manually add a BBCODE_UID value to a post, then it appears correctly in the search result...
But bbcode_uid shouldn't be used anymore with new textformatter, isn't that right?
I have no clue. When I look in the DB, some posts have them. And some don't.
Got this! The problem is that it doesn't have bbcode_uid
. Search then considers it a plaintext and won't remove BBcodes. I will post a fix soon.