首页 文章 精选 留言 我的

精选列表

搜索[数据索引],共10000篇文章
优秀的个人博客,低调大师

ES里设置索引中倒排列表仅仅存文档ID——采用docs存储后可以降低pos文件和cfs文件大小

index_options Theindex_optionsparameter controls what information is added to the inverted index, for search and highlighting purposes. It accepts the following settings: docs Only the doc number is indexed. Can answer the questionDoes this term exist in this field? freqs Doc number and term frequencies are indexed. Term frequencies are used to score repeated terms higher than single terms. positions Doc number, term frequencies, and term positions (or order) are indexed. Positions can be used forproximity or phrase queries. offsets Doc number, term frequencies, positions, and start and end character offsets (which map the term back to the original string) are indexed. Offsets are used by thepostings highlighter. Analyzedstring fields usepositionsas the default, and all other fields usedocsas the default. PUT my_index { "mappings": { "my_type": { "properties": { "text": { "type": "text", "index_options": "offsets" } } } } } PUT my_index/my_type/1 { "text": "Quick brown fox" } GET my_index/_search { "query": { "match": { "text": "brown fox" } }, "highlight": { "fields": { "text": {} } } } COPY AS CURL VIEW IN CONSOLE Thetextfield will use the postings highlighter by default becauseoffsetsare indexed. 转自:https://www.elastic.co/guide/en/elasticsearch/reference/current/index-options.html 注意:ES2.41里没有text这个type curl -XPUT 'http://localhost:9200/hec_test2' -d ' { "mappings": { "hec_type2": { "properties": { "filed-0": { "type": "string", "index_options": "docs" }, "filed-1": { "type": "string", "index_options": "docs" } } } } } ' 比较测试: 可以比默认的节省10+%的存储空间! 本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6397522.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

数据运算

算术运算 <meta charset="UTF-8"> <script type="text/javascript"> /* 算术运算*/ var num1 = 2; var num2 = 3; // 加法 var sum = num1 + num2; // 5 // 减法 var minus = num1 - num2; // -1 // 乘法 var aa = num1 * num2; // 6 // 除法 var bb = num1 / num2; //0.666666 // 取余 var cc = num1 % num2; // 2 // 自加、自减 var i = 10; var m = 10 + i++; console.log('m',m); // 20 console.log(i); // 11 var j = 5; var n = 10 + (++j); console.log('n',n); // 16 </script> 逻辑运算 <meta charset="UTF-8"> <script type="text/javascript"> // 逻辑非 var boo1 = true; var boo2 = !boo1; // false var num = 2; var num2 = !num; console.log('num2',num2); // false ??? // 逻辑与: 同时为真结果为true, 只要有一个为false结果为false; var a = true; var b = true; var c = false; var d = false; var x = a && b; // true var y = a && c; // false var z = c && d; // false // 逻辑或: 只要有一个为真就为true var o = a || b; // true; var p = a || c; // true; var q = c || d; // false; </script> 比较运算 <meta charset="UTF-8"> <script type="text/javascript"> var a = 10; var b = 20; var c = '20'; var boo1 = a > b; // false console.log('==',b == c); // true 运算的时候c会自动转换成数字20,然后再比较 console.log('===', b === c); // false 先比较变量的类型,再比较变量的值 </script>

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册