用UTF-8字符集合,每个中文按字索引,适合简单的过滤型搜索和排序
#
# Sphinx configuration file sample
#
# WARNING! While this sample file mentions all available options,
# it contains (very) short helper descriptions only. Please refer to
# doc/sphinx.html for details.
#
#############################################################################
## data source definition
#############################################################################
source src1
{
# data source type. mandatory, no default value
# known types are ‘mysql’, ‘pgsql’, ‘xmlpipe’, ‘xmlpipe2′
type = mysql
#####################################################################
## SQL settings (for ‘mysql’ [...]
Archive for 2009年三月月
支持中文的Sphinx配置
Posted in 生活随笔 on 2009/03/31 | Leave a Comment »
会议室
Posted in 生活随笔 on 2009/03/27 | Leave a Comment »
手机拍的
Tomcat 使用须知
Posted in 生活随笔 on 2009/03/23 | Leave a Comment »
Jboss 使用须知
Posted in 生活随笔 on 2009/03/19 | Leave a Comment »
64位JDK的好处:
更宽的数据路径:RAM 和 CPU 之间的管道加倍了,这提高了受内存限制的程序的性能。
64 位内存解析机制提供了虚拟的无限制的(1 exabyte)堆分配。然而,大的堆会影响到垃圾回收(garbage collection)。
运行在大于 1.5GB 内存(包括用于垃圾回收优化的空闲空间)的系统里的应用程序应该使用 64 位的 JVM。
运行在 32 位 JVM 上且不要求大于最小堆大小的应用程序并不能在 64 位的 JVM 里受益。除去内存因素,运行在具有相同的相对时钟和体系结构的 64 位硬件上的 Java 程序并不比在 32 位平台上快
调整系统缺省的JDK:
[root@vsr ~]$ /usr/sbin/alternatives –config java
There are 2 programs which provide ‘java’.
Selection Command
———————————————–
1 [...]
Git小技巧:更新已存在项目的commit作者和邮件
Posted in 生活随笔, tagged git, version control on 2009/03/03 | Leave a Comment »
How to change git commit’s author and contact email?
不说不知道,方法很简单啊:
[~/path/to/repo]$ git config user.name “hugozhu”
[~/path/to/repo]$ git config user.email hugozhu@gmail.com
方法出处:http://github.com/guides/tell-git-your-user-name-and-email-address
FriendFeed如何使用Mysql的
Posted in 生活随笔 on 2009/03/02 | Leave a Comment »
See: How FriendFeed uses MySQL to store schema-less data
FriendFeed是风头比较旺,据说跟Twitter和Facebook的NewsFeed比有后来居上,他们是这样使用Mysql的:
1)尽量把Mysql作为数据存储而已, 表结构尽量简单;
2) 增加功能,尽量创建新表而不是修改已有的表结构;
3) 应用程序的数据数据实体,使用hash结构,用zlib打包后存在一个字段内,几乎不用Join;
4)对于查询需求,建立相应的索引表(表里存储需查询的实体属性),而不是在实体数据表上建索引;
上面那些经验有不少是反范式的,但对于苛刻性能要求,范式就让它一边凉快去吧。。。
My name is Hugo Zhu.



