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

elasticsearch\Searcher #132

Closed ssmason closed 8 years ago

ssmason commented 8 years ago

Hi , many thanks for this amazing plugin.

I am starting to get to grips with using the API to create a controller for using in the WP javascript API

I am using elasticsearch\Searcher::search which appear at first glance to be working. When i pass a search value it correctly returns the records found. HOWEVER , it is only returning the ID and the facet results with none of the content i expect.

I am being new this assuming i am missing something quite fundamental however any guidance in this would be really appreciated.

Steve

wkw commented 8 years ago

I believe that's the expected behavior; with those IDs, FES loads the posts from the WordPress database. The content in ES is just for running queries against, not for display.

parisholley commented 8 years ago

@wkw is correct, this plugin uses the posts in wordpress and won't return the content. this was a design choice to allow to only store some data/metadata in ES but then get full blown data/objects on WP side. feel free to look into submitting a pull if you prefer a different approach