Closed markoheijnen closed 11 years ago
very good point.. my use case didn't require to know the name (and i typical do cache) but having the full text in the index is very valuable. seems like a lot of thought has been put into that library and should maybe consider using it in future.. but at a minimum storing the slug/name/id is a good approach. only issue now is finding a way to incorporate those changes with breaking anyone who has already indexed..
I guess everything should be reindexed. What can be a pain for a bigger installation.
luckily i don't think the plugin is super widespread, so we probably have a bit of wiggle room
I updated the plugin to use taxonomy names for search but still use slugs for faceting.
Currently facets will return slugs but ids/title is a way better. I'm curious if we can implement something what Automattic did: https://github.com/Automattic/wpes-lib/blob/master/src/class.wpes-wp-index-builder.php#L165
For example when you have a widget you can then use get_terms() with the include param. Now you need to do it for every term what will cause performance issues when not using object cache.