Solr Facet引发思考 on the road
下面的内容包括概念都是个人想到的,不专业或者不规范请知晓。理解意义就行。
1.为什么是facet
搜索与推荐本来是不分家的,搜索没有推荐就是存储了,有推荐的搜索才是真正的搜索,才体现搜索的“情感”(query解析、排序、页面展示)、搜索引擎的“难点”(用户意图理解、最有价值信息、最友好交互)。
但是搜索很多概念又是源于存储,例如facet就是源于数据库的groupby。单纯的groupby,搜索肯定顶不过数据库。但是搜索有个好处,就是查询条件的文本、区间、模糊有优势,就是获取结果id有优势。之后的facet统计在存储不见得好于数据库。
另外,对于千万级别的数据,从成本、快捷、维护、重用、准实时角度看,使用solr的facet无疑是首选。
使用时,或者是源数据直接进入索引、直接输出统计结果。或者是已经统计好了,只需输出结果。后者检索角色更浓,前者实时角色更浓。
2.facet相对hadoop hive优势
Facet对轻量级处理应该更有优势。表现在灵活性比较强。一份索引,可以随时、随地facet各种信息。数据重用,既可以用一般查询,也可以用统计输出,无需中间结果,按需获取。低成本,开源的solr、lucene系统,轻量级,没有hadoop、hive那么重。
3.solr当前支持程度
Solr当前支持stored=true的
文本域facet,以及数字域的区间facet,不支持数字类型的facet。
Solr当前facet统计可以设置丰富的各种参数,基于遍历的,性能有瓶颈再大数据量上。性能的提升严重依赖cache的配置,但是jvm下垃圾回收又是问题。
4.扩展与优化
已经支持单层facet
Query=q facet=on facet.field=fieldA,fieldB
不支持双层或者混合facet
Query=q1,q2 facet=on facet.field=fieldsA,fieldB
或者
Query=q1 facet=on facet.field=fieldA Another
query=q2 facet=on facet.field=field2
针对有规律的请求
Bean请求队列会,返回也队列化
Id
查询,不需要相关性计算,去得分
Rows、start
都设为0,只获取facet信息
Sort=id asc
自然顺序
只扫描单次的,filterquery可以不开启
Elasticsearch 多字段查询 best_fields、most_fields、cross_fields,傻傻分不清楚? Multi-match query 的目的多字段匹配,但 Multi-match query 中的 best_fields, most_fields, cross_fields 分不清楚,都什么含义? 下面我们一一举例解读。
相关文章
- INSERT ... ON DUPLICATE KEY UPDATE Statement
- Please Put on the Earphone for This Article
- 【阅读】A Comprehensive Survey on Distributed Training of Graph Neural Networks——翻译
- 【错误记录】PyCharm 运行 Python 程序报错 ( SyntaxError: Non-ASCII character ‘xe5‘ in file x.py on line 1, but )
- ORA-25002: cannot create INSTEAD OF triggers on tables ORACLE 报错 故障修复 远程处理
- ORA-30971: illegal operation on the Path Table ORACLE 报错 故障修复 远程处理
- ORA-32338: on commit refresh grab all the detailed tables ORACLE 报错 故障修复 远程处理
- ORA-38918: RETRY_ON_ROW_CHANGE hint disallowed for this operation ORACLE 报错 故障修复 远程处理
- ORA-39160: error on whats my name call ORACLE 报错 故障修复 远程处理
- ORA-46011: The value of the “selectPrivilege” element is too long. ORACLE 报错 故障修复 远程处理
- ORA-53010: The value of the tag is null. ORACLE 报错 故障修复 远程处理
- ORA-54516: adjacent outer rings of composite surface cannot be on same plane ORACLE 报错 故障修复 远程处理
- ORA-55567: The _highthreshold_undoretention value should be at least string based on the current undo retention settings. ORACLE 报错 故障修复 远程处理
- ORA-10618: Operation not allowed on this segment ORACLE 报错 故障修复 远程处理
- ORA-14701: partition-extended name or bind variable must be used for DMLs on tables partitioned by the System method ORACLE 报错 故障修复 远程处理
- MySQL Error number: MY-013328; Symbol: ER_GRP_RPL_ERROR_ON_CERT_DB_INSTALL; SQLSTATE: HY000 报错 故障修复 远程处理
- 服务器部署_nginx报错: [warn] conflicting server name “www.test.com” on 0.0.0.0:80, ignored详解程序员
- Exploring How to Change Chinese Language Input to English on Linux(linux中文改英文)
- dockerMySQL on Docker: A Comprehensive Guide(mysqlwithin)
- MySQL 5 on 64bit系统的安装和运行(mysql564位)
- Setting up your TPLink router on Linux made easy with these simple steps(tplinklinux)
- Exploring the Benefits of DDR on Linux Systems: A Comprehensive Guide(linuxddr)
- Boost Your Version Control with Subsvn on Linux: A Comprehensive Guide(subsvnlinux)
- Mastering the Art of Process Management on Linux with C and Kill Commands(linuxckill)
- Exploring the Benefits of UML on Linux: Streamlining Software Development and Design(linuxuml)
- Exploring the Benefits and Compatibility of JDK1.6 on Linux OS(jdk1.6linux)
- Exploring the Power of Flex on Linux: A Comprehensive Guide(linuxflex)
- delete cascadeOracle 中 ON DELETE CASCADE 的使用(oracle中的on)