# SOURCES source baseSource { type = mysql sql_host = localhost sql_port = 3306 sql_db = donzo_ru_db sql_user = donzo_ru sql_pass = dQ8jVSEe_zfv0e sql_query_pre = SET CHARACTER_SET_RESULTS=utf8mb4 sql_query_pre = SET SESSION query_cache_type=OFF sql_query_pre = SET NAMES utf8mb4 } source itemsSource : baseSource { sql_query_range = SELECT MIN(id), MAX(id) FROM bff_listings_items sql_range_step = 1000 sql_ranged_throttle = 0 sql_attr_uint = is_publicated sql_attr_uint = status sql_attr_uint = is_moderating sql_attr_uint = moderated sql_attr_uint = import sql_attr_uint = imgcnt sql_attr_uint = user_id sql_attr_uint = company_id sql_attr_uint = geo_city sql_attr_uint = addr_lat sql_attr_uint = addr_lon sql_attr_uint = district_id sql_attr_uint = metro_id sql_attr_uint = cat_id sql_attr_uint = cat_type sql_attr_uint = owner_type sql_attr_uint = regions_delivery sql_attr_uint = created sql_attr_uint = cat_id1 sql_attr_uint = cat_id2 sql_attr_uint = cat_id3 sql_attr_uint = cat_id4 sql_attr_uint = cat_id5 sql_attr_uint = f1 sql_attr_uint = f2 sql_attr_uint = f3 sql_attr_uint = f4 sql_attr_uint = f5 sql_attr_uint = f6 sql_attr_uint = f7 sql_attr_uint = f8 sql_attr_uint = f9 sql_attr_uint = f10 sql_attr_uint = f11 sql_attr_uint = f12 sql_attr_uint = f13 sql_attr_uint = f14 sql_attr_uint = f15 sql_attr_uint = geo_region1 sql_attr_uint = geo_region2 sql_attr_uint = geo_region3 sql_attr_uint = geo_region4 sql_attr_uint = svc_fixed_order sql_attr_float = price_search } source itemsSourceMain : itemsSource { sql_query_pre = SET CHARACTER_SET_RESULTS=utf8mb4 sql_query_pre = SET NAMES utf8mb4 sql_query_pre = UPDATE bff_sphinx SET indexed = NOW() WHERE module = 'listings-items' sql_query = \ SELECT i.id, i.user_id, i.company_id, i.is_publicated, i.status, i.is_moderating, i.moderated, i.import, i.phones, i.geo_city, i.district_id, i.metro_id, i.regions_delivery, i.addr_addr, i.addr_lat, i.addr_lon, i.imgcnt, i.price_search, i.cat_id, i.cat_type, i.owner_type, UNIX_TIMESTAMP(i.created) as created, IFNULL(i.title_translates, i.title) AS title, IFNULL(i.descr_translates, i.descr) AS descr, i.cat_id1, i.cat_id2, i.cat_id3, i.cat_id4, i.cat_id5, i.f1, i.f2, i.f3, i.f4, i.f5, i.f6, i.f7, i.f8, i.f9, i.f10, i.f11, i.f12, i.f13, i.f14, i.f15, i.f16, i.f17, i.f18, i.f19, i.f20, i.geo_region1, i.geo_region2, i.geo_region3, i.geo_region4, UNIX_TIMESTAMP(i.svc_fixed_order) as svc_fixed_order \ FROM bff_listings_items i \ WHERE i.modified=$start AND i.id<=$end } source itemsSourceDelta : itemsSource { sql_query_pre = SET CHARACTER_SET_RESULTS=utf8mb4 sql_query_pre = SET NAMES utf8mb4 sql_query_pre = UPDATE bff_sphinx SET indexed_delta = NOW() WHERE module = 'listings-items' sql_query = \ SELECT i.id, i.user_id, i.company_id, i.is_publicated, i.status, i.is_moderating, i.moderated, i.import, i.phones, i.geo_city, i.district_id, i.metro_id, i.regions_delivery, i.addr_addr, i.addr_lat, i.addr_lon, i.imgcnt, i.price_search, i.cat_id, i.cat_type, i.owner_type, UNIX_TIMESTAMP(i.created) as created, IFNULL(i.title_translates, i.title) AS title, IFNULL(i.descr_translates, i.descr) AS descr, i.cat_id1, i.cat_id2, i.cat_id3, i.cat_id4, i.cat_id5, i.f1, i.f2, i.f3, i.f4, i.f5, i.f6, i.f7, i.f8, i.f9, i.f10, i.f11, i.f12, i.f13, i.f14, i.f15, i.f16, i.f17, i.f18, i.f19, i.f20, i.geo_region1, i.geo_region2, i.geo_region3, i.geo_region4, UNIX_TIMESTAMP(i.svc_fixed_order) as svc_fixed_order \ FROM bff_listings_items i \ WHERE i.modified >= (SELECT indexed FROM bff_sphinx WHERE module = 'listings-items') \ AND i.id>=$start AND i.id<=$end } # INDEXES index itemsIndexMain { mlock = 0 morphology = stem_enru charset_table = 0..9, @, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F, U+002D html_strip = 1 html_remove_elements = style, script, code min_infix_len = 0 min_prefix_len = 3 min_word_len = 2 index_exact_words = 1 expand_keywords = 1 source = itemsSourceMain path = /var/lib/sphinx/itemsSourceMain } index itemsIndexDelta : itemsIndexMain { source = itemsSourceDelta path = /var/lib/sphinx/itemsSourceDelta }