Ticket #88 (closed 需求: fixed)
xindex 文件及指令格式说明(电脑网专用)
| Reported by: | chenchongqi | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 2012报价库5.0 |
| Component: | 报价库 | Version: | 报价库5.0 |
| Keywords: | xindex | Cc: | |
| Due Date: |
Description (last modified by chenchongqi) (diff)
这里是针对通用说明的补充,通用说明在这里: http://svn.demo.pc.com.cn/svn/xindex/trunk/README.txt
index文件
- 文件名
- 历史产品:小类id-h.txt 如手机历史产品 20937-h.txt
- 非历史产品:小类id.txt 如手机非历史产品 20937.txt
- 文件格式
Record struct match Query --------+---+-------------------+-----------+ Field |ID | IndexField | ExtraField| | | 0 1 2 3 4 | 0 1 2 | --------+---+---+---+---+---+---+---+---+---+ Record | x | x | x | x | x | x | x | x | x | | x | x | x | x | x | x | x | x | x | | x | x | x | x | x | x | x | x | x | | x | x | x | x | x | x | x | x | x | | x | x | x | x | x | x | x | x | x | | x | x | x | x | x | x | x | x | x | --------+---+---+---+---+---+---+---+---+---+ Query | | m0| m1| m2| m3| m4| | | | match +---+---+---+---+---+---+---+---+---+ | | | | | | | 0 | 1 | 2 | sort_index +---+---+---+---+---+---+---+---+---+ | | x | | | | | | | | sort_price --------+---+---+---+---+---+---+---+---+---+- IndexField?
- m0:全国价
- m1:品牌
- m2-m7:自定义查询项item1-item6
- ExtraField?
- e1:热度
- e2:创建时间
- e3:评分
- e4:北京分站价格
- e5:上海分站价格
- e6:广州分站价格
- e7:深圳分站价格
- e8:成都分站价格
- IndexField?
price文件
- 文件名 price.txt
- 文件格式
全国、北上广深成都价格在ExtraField中的位置,因为前台缺省进入的页面是全国页面,因此把全国价格放在m0位置,这个位置原始数据就是排好序的,速度最快。 @first_area: ---------+----+----+----+----+----+----+ Area ID | a0 | a1 | a2 | a3 | a4 | a5 | ---------+----+----+----+----+----+----+ Field ID | m0 | e4 | e5 | e6 | e7 | e8 | ---------+----+----+----+----+----+----+ a0 全国地区id a1-a5 北上广深地区id m0 = 0 e4 = 4 e5 = 5 e6 = 6 e7 = 7 e8 = 8 分站对应关系 @second_area: --------------+----+----+----+----+----+----+ Minor Area ID | n1 | n2 | n3 | n4 | n5 | n6 | ... --------------+----+----+----+----+----+----+ Main Area ID | a1 | a1 | a1 | a2 | a2 | a3 | ... --------------+----+----+----+----+----+----+ n1-nx 除了北上广深成都全国外其他各小分站地区id a1-a5 被引用的主要分站地区id 分站本地价格 @second_area_price: --------+------------+-------+ Area Id | Product Id | Price | --------+------------+-------+
例子
- 查手机历史产品,品牌是26588,按全国价格倒序(缺省)排序,offset是0,50条:index=20937-h+m1=26588+sort_price+limit=0,50
- 查手机非历史产品,品牌是26588,地区是1(广州),按地区广州价格正序排序,offset是100,50条:index=20937+area=1+m1=26588+sort_price+asc+limit=100,50
- 查手机非历史产品,品牌是26588,地区是30(无报价的小分站),按地区报价正序排序,offset是100,50条:index=20937+area=30+m1=26588+sort_price+asc+limit=100,50
- 不管是北上广深成都还是其他引用这些分站的小分站,用价格排序的都是直接sort_price搞定
Change History
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)