在SOLR小的二进制字段搜索/索引 [英] Search / indexing on small binary fields in SOLR

查看:462
本文介绍了在SOLR小的二进制字段搜索/索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要与SOLR指数小二进制字符串,但未能如愿。其实我试图像SHA-1,MD5之类的东西UUID的哈希值进行搜索。

Need to index small binary strings with SOLR but failed to do so. Actually I'm trying to search on hashes like SHA-1, MD5 and things like UUID.

有二进制字段用来进行索引。

Have binary field intended to be indexed.

<field name="fi" type="binary" indexed="true" stored="true" required="false" multiValued="false" />

有二进制类型定义。

Have binary type definition.

<fieldtype name="binary" class="solr.BinaryField"/>

为什么任何试图在这一领域甚至与来选择网络连接:* 请求不能找到什么?任何替代我的做法?

Why any try to select on this field even with fi:* request cannot find anything? Any alternative to my approach?

推荐答案

如果您的数据仅仅是SHA1等,我认为你可以完全使这项工作具有的 StrField 。当然,如果你需要preFIX搜索一定要与solr.EdgeNGramTokenizerFactory正确分析它。

if your data is just SHA1 etc, I think you can perfectly make this work with a StrField. Of course if you need prefix searches be sure to properly analyze it with solr.EdgeNGramTokenizerFactory.

对于您使用的是二进制领域,我从来没有使用它自己,但什么明显的作用是连接在whatver您发送的base64 code,并建立索引的话,这样你就可以reallly发送二进制数据(像.exe文件)。

Regarding the binary field you are using, I never had to use it myself, but what apparently does is encode in base64 whatver you send, and index it then, so you can reallly send binary data (like an .exe file).

这篇关于在SOLR小的二进制字段搜索/索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆