parisholley / wordpress-fantastic-elasticsearch

Improve wordpress search performance/accuracy and enable faceted search by leveraging an ElasticSearch server.
MIT License
162 stars 64 forks source link

Index more information for taxonomies #33

Closed markoheijnen closed 11 years ago

markoheijnen commented 11 years ago

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.

parisholley commented 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..

markoheijnen commented 11 years ago

I guess everything should be reindexed. What can be a pain for a bigger installation.

parisholley commented 11 years ago

luckily i don't think the plugin is super widespread, so we probably have a bit of wiggle room

parisholley commented 11 years ago

I updated the plugin to use taxonomy names for search but still use slugs for faceting.