简体   繁体   中英

riak search result excerpt

Doeas是否有人知道riaksearch是否能够生成类似于lucene的高亮点摘录?

Riak Search doesn't expose this functionality out of the box, but with a little work you can create a rough approximation.

Riak Search allows you to feed search results into a MapReduce job. If you do this, then your Map or Reduce function will also get a list of token positions in the document that matched the query (this is exposed as keydata, http://www.basho.com/search.php?q=keydata ). Using these positions, you can write code to mark up the document or excerpt portions of text.

我认为这个功能几乎不会在Riak中实现,因为它的哲学意味着它不关心究竟存储在值中的是什么,因此除了提供像索引这样的元数据之外,它不会以任何有意义的方式处理它们。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM