Opened 7 years ago
Closed 7 years ago
#3550 closed defect (bug) (fixed)
Plugins search with countdown keyword does not work
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Improved Search | Priority: | normal |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
Today I tried the search with one keyword (Countdown) but it's return nothing you can check this URL https://wordpress.org/plugins/search/countdown/
Change History (3)
#1
@
7 years ago
- Keywords countdown removed
- Milestone changed from Plugin Directory v3.0 to Improved Search
- Priority changed from high to normal
#2
@
7 years ago
Should be all fixed now, and I've reindexed all plugins. Sorry for the slow fix I wanted to make sure I got enough review of the fix since it affects all of our indexing.
The root cause is kinda crazy.
The cause is:
- A doc with post meta of "2e47eb" (this was on the beeketing plugin for the color code of the header https://wordpress.org/plugins/beeketing-for-woocommerce/)
- In addition to indexing the string, we try to index all meta as a long and a float.
- When php converts to a float, we get 2e47 (Whee!)
- When php outputs 2e47 it becomes 200000000000000008769168609015239470926809530368.0 in the json. (Ugh!)
- ES indexes this fine, it doesn't fail. (Hmmm)
- Our search queries request a couple of fields beyond just post_id. Some of these fields are not "stored" so ES has to take the original _source json and reparse it to fulfill the request
- The JSON parser for extracting fields though apparently does not handle these large values in the same way as the indexing parser. So 200000000000000008769168609015239470926809530368.0 is unparsable because it is so large and an error is thrown.
Ultimately the fix is to have better boundary checking on the fields when indexing.
Basically any search that was returning the beeketing plugin in the results was triggering this failure. "countdown" just happened to be one case. It looks like there was at least one other plugin that had this problem also. I can see from query logs that this fix has cleaned up a number of query failures (they were pretty rare, but had been getting more common). Not seeing any query failures now.
Thanks for reporting this.
I believe this is most like as noted in #3327:
https://meta.trac.wordpress.org/ticket/3327#comment:3
https://meta.trac.wordpress.org/ticket/3327#comment:5
The https://wordpress.org/plugins/countdown/ hasn't been updated in 6+ years
https://meta.trac.wordpress.org/ticket/3327#comment:6
Searching https://wordpress.org/plugins/search/countdown/ results in no results found
I'm leaning towards that the search results should surface the countdown plugin rather than return no results though how that impacts search as a whole I'm not sure of and will defer to the meta eam members familiar with this.