Java – change the field name in the elasticsearch response

I need to change the field name in the elastic search response (for example, change "title" to "title") I want to avoid parsing JSON responses that take a lot of time

Solution

I'm worried that elastic search may not work You may need to parse the response consider

alias

A content introduced in Apache Solr 4.0 cannot be used in elasticsearch now. It can convert the result document First, Solr allows you to set an alias for the returned field. For example, you can return the field price as needed_ USD or price_ EUR as price The second thing is to be able to return the value returned by the function as a (pseudo) field in the result (or field) Solr can also return fields starting with a given prefix (for example, all fields starting with price) In addition to being able to obtain function values as fields added to matching documents at run time, other functions are not breakthrough, although they can be convenient in some cases

from http://blog.sematext.com/2012/10/01/solr-vs-elasticsearch-part-3-searching/

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>