package com.uas.search.constant;

/**
 * 索引相关的常量
 * 
 * @author suntg
 * @since 2016年8月3日下午1:54:14
 */
public class SearchConstants {

	/**
	 * 默认搜索的最大的记录条数
	 */
	public static final int TOP_NUM = 1024 * 1024 * 1024;

	/**
	 * 消息队列名，该队列存放kind、brand、component等表的改动信息
	 */
	public static final String LUCENE_QUEUE_NAME = "lucene_queue";

	/**
	 * 消息队列对应的表
	 */
	public static final String LUCENE_QUEUE_TABLE_NAME = "lucene_queue_tb";

	/**
	 * 类目表名
	 */
	public static final String KIND_TABLE_NAME = "product$kind";

	/**
	 * 品牌表名
	 */
	public static final String BRAND_TABLE_NAME = "product$brand";

	/**
	 * 器件表名
	 */
	public static final String COMPONENT_TABLE_NAME = "product$component";

	/**
	 * 器件表名
	 */
	public static final String GOODS_TABLE_NAME = "v$product$cmpgoods";

	/**
	 * 商城销售订单表名
	 */
	public static final String ORDER_TABLE_NAME = "trade$order";

	/**
	 * 商城销售订单的发货单表名
	 */
	public static final String ORDER_INVOICE_TABLE_NAME = "trade$invoice_fmor";

	/**
	 * 商城采购订单表名
	 */
	public static final String PURCHASE_TABLE_NAME = "trade$purchase";

	/**
	 * 商城采购订单的发货单表名
	 */
	public static final String PURCHASE_INVOICE_TABLE_NAME = "trade$invoice_fmpu";

	// 类目索引字段的key
	public static final String KIND_ID_FIELD = "ki_id";
	public static final String KIND_NAMECN_FIELD = "ki_name_cn";
    public static final String KIND_NAMECN_UNTOKENIZED_FIELD = "ki_name_cn_untokenized";
	public static final String KIND_LEVEL_FIELD = "ki_level";
	public static final String KIND_ISLEAF_FIELD = "ki_isleaf";
    public static final String KIND_VISIT_COUNT_FIELD = "ki_visit_count";
    public static final String KIND_SEARCH_COUNT_FIELD = "ki_search_count";

	// 品牌索引字段的key
	public static final String BRAND_ID_FIELD = "br_id";
	public static final String BRAND_NAMECN_FIELD = "br_name_cn";
	public static final String BRAND_NAMEEN_FIELD = "br_name_en";
    public static final String BRAND_NAMECN_UNTOKENIZED_FIELD = "br_name_cn_untokenized";
    public static final String BRAND_NAMEEN_UNTOKENIZED_FIELD = "br_name_en_untokenized";
	public static final String BRAND_UUID_FIELD = "br_uuid";
    public static final String BRAND_VISIT_COUNT_FIELD = "br_visit_count";
    public static final String BRAND_SEARCH_COUNT_FIELD = "br_search_count";
    public static final String BRAND_WEIGHT_FIELD = "br_weight";

	// 器件索引字段的key
	public static final String COMPONENT_ID_FIELD = "cmp_id";
	public static final String COMPONENT_UUID_FIELD = "cmp_uuid";
	public static final String COMPONENT_CODE_FIELD = "cmp_code";
    public static final String COMPONENT_VISIT_COUNT_FIELD = "cmp_visit_count";
    public static final String COMPONENT_SEARCH_COUNT_FIELD = "cmp_search_count";
	public static final String COMPONENT_RESERVE_FIELD = "cmp_reserve";
	public static final String COMPONENT_SAMPLE_QTY_FIELD = "cmp_sample_qty";
	public static final String COMPONENT_ORIGINAL_QTY_FIELD = "cmp_original_qty";
	public static final String COMPONENT_INACTION_STOCK_QTY_FIELD = "cmp_inaction_stock_qty";
	public static final String COMPONENT_KI_ID_FIELD = "ki_id";
	public static final String COMPONENT_KI_NAME_UNTOKENIZED_FIELD = "ki_name_cn_untokenized";
	public static final String COMPONENT_KI_NAME_FIELD = "ki_name_cn";
	public static final String COMPONENT_KI_LEVEL_FIELD = "ki_level";
    public static final String COMPONENT_KI_VISIT_COUNT_FIELD = "ki_visit_count";
    public static final String COMPONENT_KI_SEARCH_COUNT_FIELD = "ki_search_count";
	public static final String COMPONENT_BR_ID_FIELD = "br_id";
	public static final String COMPONENT_BR_NAMECN_FIELD = "br_name_cn";
	public static final String COMPONENT_BR_NAMEEN_FIELD = "br_name_en";
	public static final String COMPONENT_BR_NAMECN_UNTOKENIZED_FIELD = "br_name_cn_untokenized";
	public static final String COMPONENT_BR_NAMEEN_UNTOKENIZED_FIELD = "br_name_en_untokenized";
	public static final String COMPONENT_BR_UUID_FIELD = "br_uuid";
    public static final String COMPONENT_BR_VISIT_COUNT_FIELD = "br_visit_count";
    public static final String COMPONENT_BR_SEARCH_COUNT_FIELD = "br_search_count";
    public static final String COMPONENT_BR_WEIGHT_FIELD = "br_weight";
	/**
	 * 创建器件属性的索引时，在属性id的前面添加该前缀作为Field的键
	 */
	public static final String COMPONENT_PROPERTY_PREFIX = "pr_";
	/**
	 * 另外创建的经过分词的属性值，添加后缀作为Field的键
	 */
	public static final String COMPONENT_PROPERTY_TOKENIZED_SUFFIX = "_tokenized";

	// 批次索引字段的key
	public static final String GOODS_GO_ID_FIELD = "go_id";
	public static final String GOODS_GO_RESERVE_FIELD = "go_reserve";
	public static final String GOODS_GO_STATUS_FIELD = "go_status";
	public static final String GOODS_GO_MINPRICERMB_FIELD = "go_minpricermb";
	public static final String GOODS_GO_MINPRICEUSD_FIELD = "go_minpriceusd";
    public static final String GOODS_GO_VISIT_COUNT_FIELD = "go_visit_count";
	public static final String GOODS_CRNAME_FIELD = "cr_name";
	public static final String GOODS_ST_UUID_FIELD = "st_uuid";
	public static final String GOODS_ST_TYPE_FIELD = "st_type";
	public static final String GOODS_CMP_ID_FIELD = "cmp_id";
	public static final String GOODS_CMP_CODE_FIELD = "cmp_code";
	public static final String GOODS_CMP_DESCRIPTION_FIELD = "cmp_description";
    public static final String GOODS_CMP_VISIT_COUNT_FIELD = "cmp_visit_count";
    public static final String GOODS_CMP_SEARCH_COUNT_FIELD = "cmp_search_count";
	public static final String GOODS_KI_ID_FIELD = "ki_id";
	public static final String GOODS_KI_NAME_CN_FIELD = "ki_name_cn";
	public static final String GOODS_KI_NAME_CN_UNTOKENIZED_FIELD = "ki_name_cn_untokenized";
	public static final String GOODS_KI_LEVEL_FIELD = "ki_level";
	public static final String GOODS_KI_ISLEAF_FIELD = "ki_isleaf";
    public static final String GOODS_KI_VISIT_COUNT_FIELD = "ki_visit_count";
    public static final String GOODS_KI_SEARCH_COUNT_FIELD = "ki_search_count";
	public static final String GOODS_BR_ID_FIELD = "br_id";
	public static final String GOODS_BR_NAME_CN_FIELD = "br_name_cn";
	public static final String GOODS_BR_NAME_EN_FIELD = "br_name_en";
	public static final String GOODS_BR_NAME_CN_UNTOKENIZED_FIELD = "br_name_cn_untokenized";
	public static final String GOODS_BR_NAME_EN_UNTOKENIZED_FIELD = "br_name_en_untokenized";
	public static final String GOODS_BR_UUID_FIELD = "br_uuid";
    public static final String GOODS_BR_VISIT_COUNT_FIELD = "br_visit_count";
    public static final String GOODS_BR_SEARCH_COUNT_FIELD = "br_search_count";
    public static final String GOODS_BR_WEIGHT_FIELD = "br_weight";
	public static final String GOODS_PR_ID_FIELD = "pr_id";
	public static final String GOODS_PR_PCMPCODE_FIELD = "pr_pcmpcode";

	// 商城销售订单索引字段的key
	/**
	 * 对应销售单id（数据库id字段）
	 */
	public static final String ORDER_ID_FIELD = "or_id";
	/**
	 * 对应销售单号（数据库or_id字段），因易与id命名混淆，其他类、lucenne建索引时该字段难以区分，特以此命名
	 */
	public static final String ORDER_CODE_FIELD = "or_code";
	public static final String ORDER_BUYERUU_FIELD = "or_buyeruu";
	public static final String ORDER_BUYERNAME_FIELD = "or_buyername";
	public static final String ORDER_BUYERENUU_FIELD = "or_buyerenuu";
	public static final String ORDER_BUYERENNAME_FIELD = "or_buyerenname";
	public static final String ORDER_SELLERENUU_FIELD = "or_sellerenuu";
	public static final String ORDER_SELLERENNAME_FIELD = "or_sellerenname";
	public static final String ORDER_STATUS_FIELD = "or_status";
	public static final String ORDER_DETAILS_FIELD = "or_details";

	// 商城销售订单的发货单索引字段的key
	/**
	 * 对应商城销售订单的发货单id（数据库id字段）
	 */
	public static final String ORDER_INVOICE_ID_FIELD = "oi_id";
	/**
	 * 对应销售单发货单号（数据库in_id字段），因易与id命名混淆，其他类、lucenne建索引时该字段难以区分，特以此命名
	 */
	public static final String ORDER_INVOICE_CODE_FIELD = "oi_code";
	public static final String ORDER_INVOICE_BUYERUU_FIELD = "oi_buyeruu";
	public static final String ORDER_INVOICE_BUYERNAME_FIELD = "oi_buyername";
	public static final String ORDER_INVOICE_BUYERENUU_FIELD = "oi_buyerenuu";
	public static final String ORDER_INVOICE_BUYERENNAME_FIELD = "oi_buyerenname";
	public static final String ORDER_INVOICE_STATUS_FIELD = "oi_status";
	public static final String ORDER_INVOICE_DETAILS_FIELD = "oi_details";

	// 商城采购订单索引字段的key
	/**
	 * 对应采购单id（数据库id字段）
	 */
	public static final String PURCHASE_ID_FIELD = "pu_id";
	/**
	 * 对应采购单号（数据库pu_id字段），因易与id命名混淆，其他类、lucenne建索引时该字段难以区分，特以此命名
	 */
	public static final String PURCHASE_CODE_FIELD = "pu_code";
	public static final String PURCHASE_SELLERENUU_FIELD = "pu_sellerenuu";
	public static final String PURCHASE_SELLERENNAME_FIELD = "pu_sellerenname";
	public static final String PURCHASE_STATUS_FIELD = "pu_status";
	public static final String PURCHASE_DETAILS_FIELD = "pu_details";

	// 商城采购订单的发货单索引字段的key
	/**
	 * 对应商城采购订单的发货单id（数据库id字段）
	 */
	public static final String PURCHASE_INVOICE_ID_FIELD = "pi_id";
	/**
	 * 对应采购单发货单号（数据库in_id字段），因易与id命名混淆，其他类、lucenne建索引时该字段难以区分，特以此命名
	 */
	public static final String PURCHASE_INVOICE_CODE_FIELD = "pi_code";
	public static final String PURCHASE_INVOICE_SELLERENUU_FIELD = "pi_sellerenuu";
	public static final String PURCHASE_INVOICE_SELLERENNAME_FIELD = "pi_sellerenname";
	public static final String PURCHASE_INVOICE_STATUS_FIELD = "pi_status";
	public static final String PURCHASE_INVOICE_DETAILS_FIELD = "pi_details";

	public static final String CREATETIME_FIELD = "createtime";
}
