摘要: 1,创建索引 2,简单搜索 3,收集器 实现Collector和LeafCollector getLeafCollector中获取reader collect中统计 4,grouping 索引字段需设置分词并设置词项量 5,facet 维度统计,需设置维度字段FacetField 第一步构造索引Se 阅读全文
posted @ 2018-03-15 14:51 ambitionless 阅读(140) 评论(0) 推荐(0) 编辑
摘要: ASCLL 码 占一个字节,但是大部分中文字符超过了一个字节,所以会出现乱码 unicode 码 一般占2个字节,部分字符会占4个字节 utf-8 码,UTF-8编码把一个Unicode字符根据不同的数字大小编码成1-6个字节,常用的英文字母被编码成1个字节,汉字通常是3个字节,只有很生僻的字符才会 阅读全文
posted @ 2016-05-28 11:11 ambitionless 阅读(272) 评论(0) 推荐(0) 编辑
摘要: //主方法 public static String DateToCh(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH) + 1; ... 阅读全文
posted @ 2016-05-20 17:37 ambitionless 阅读(704) 评论(0) 推荐(0) 编辑
摘要: public static byte[] getImageFromNetByUrl(String strUrl){ try { URL url = new URL(strUrl); HttpURLConnection conn = (HttpURLConnection)url.openConnection(); ... 阅读全文
posted @ 2016-05-20 17:36 ambitionless 阅读(2193) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-04-28 20:57 ambitionless 阅读(2) 评论(0) 推荐(0) 编辑
摘要: & 与 同为1,则为1,否则为0; | 或 其中一个为1,则为1,否则为0; ^ 异或 相同为0,不同为1; ~ 非,为1则0,为0则1; >>1 向右位移1,若正数,高位补0,负数,高位补1; 正数到负数 4 :0100 求补 1011 加1 1100 ; <<1 向左位移1,若正数,高位补0,负 阅读全文
posted @ 2016-03-25 12:37 ambitionless 阅读(811) 评论(1) 推荐(0) 编辑
摘要: spring配置 <context:property-placeholder location="classpath:config.properties" ignore-resource-not-found="true" ignore-unresolvable="true"/> config.pro 阅读全文
posted @ 2016-03-10 13:26 ambitionless 阅读(122) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-01-18 17:43 ambitionless 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 8421BCD编码,用于存储手机号码,每2位手机号码存储于一个byte中,详细转换如下: 比如手机号码 13129911472 ,13拆开为1和3,1对应2进制为 0000 0001,3对应2进制为 0000 0011,合并只有为 0001 0011,对应byte为 19,对应16进制为 0x13... 阅读全文
posted @ 2016-01-13 14:27 ambitionless 阅读(7577) 评论(0) 推荐(0) 编辑
摘要: ctrl+alt+h 查看该方法被调用的类ctrl+shift+g 搜索 阅读全文
posted @ 2016-01-08 17:01 ambitionless 阅读(177) 评论(0) 推荐(0) 编辑