Does ElasticSearch Plugin Allow Highlighting

I want to use the highlight feature of ElasticSearch with the plugin. However, I only see metadata. Has anyone successfully done this?

I’m not familiar with that feature. Maybe you could describe what you’re looking to do a little further or @mschoch may be familiar with it.

The highlighting of search results requires that you store the field you want to highlight. By default, the Couchbase Elasticsearch adapter disables storing of fields (because you end up with 2 copies of all your data).

This is just a default however, if you want to use highlighting you can enable storage for whichever fields are required in your mapping.

Thanks. I will look up how to do that. I think if I want the highlighting it makes sense to leverage that capability in ElasticSearch

https://github.com/couchbaselabs/elasticsearch-transport-couchbase/issues/6

I had not found anything on how to enable storage on ElasticSearch. Do I have to fork the plugin and make changes to the Java to do this? Or is there a simple setting somewhere to do this?

You do not need to make any changes to the plugin source code or to the index template.

What you need to change is your index mapping. Your index mapping, usually provided at the time you create your index, describes to Elasticsearch what fields your document will have, and how they should be handled. In your case you want to configure the fields which require highlighting to be stored.

Please see this section of the manual:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html

You will see that there is an attribute “store” which when set to true instructs Elasticsearch to store the field.

marty

Thank you. I was reading about the mapping, which I definitely want to tweak for many other reasons.

I am at an ElasticSearch training and one of the writers of the Definitive Guide says that ElasticSearch is deprecating Rivers which include this plugin and suggests LogStash. Does anyone know about this?

The Couchbase plugin isn’t based on a river and is not going to be affected by this. The speaker was most likely referring to the CouchDB plugin that is indeed implemented as a river.

THanks for the info. Is this project in the link below different from the plugin?

https://issues.couchbase.com/browse/CBES

Also I find the documentation on the plugin to be minimal. Where is the best place to find information on it?

Thanks for the update. Is the following project independent of the plugin:

https://issues.couchbase.com/browse/CBES