691 lines
28 KiB
Plaintext
691 lines
28 KiB
Plaintext
|
|
source base
|
||
|
|
{
|
||
|
|
type = mysql
|
||
|
|
sql_host = db
|
||
|
|
sql_user = root
|
||
|
|
sql_pass = root
|
||
|
|
sql_db = u0305746_jw
|
||
|
|
sql_port = 3306 # optional, default is 3306
|
||
|
|
#sql_sock = /opt/sphinx/index/mysqld/mysqld.sock
|
||
|
|
|
||
|
|
sql_query_pre = SET NAMES utf8
|
||
|
|
sql_query_pre = SET CHARACTER SET utf8
|
||
|
|
}
|
||
|
|
|
||
|
|
source rf_regions : base
|
||
|
|
{
|
||
|
|
sql_query_pre = SET NAMES 'utf8'
|
||
|
|
sql_query_pre = SET CHARACTER SET utf8
|
||
|
|
sql_query_pre = SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'
|
||
|
|
|
||
|
|
sql_query = \
|
||
|
|
SELECT id, id as idr, parent, kladr, name, code FROM rf_regions
|
||
|
|
|
||
|
|
sql_field_string = idr
|
||
|
|
sql_attr_bigint = code
|
||
|
|
sql_field_string = parent
|
||
|
|
sql_field_string = kladr
|
||
|
|
sql_field_string = name
|
||
|
|
}
|
||
|
|
|
||
|
|
index rf_regions
|
||
|
|
{
|
||
|
|
source = rf_regions
|
||
|
|
path = /opt/sphinx/index/rf_regions
|
||
|
|
}
|
||
|
|
|
||
|
|
source objects:base
|
||
|
|
{
|
||
|
|
sql_query_pre = SET NAMES 'utf8'
|
||
|
|
sql_query_pre = SET CHARACTER SET utf8
|
||
|
|
sql_query_pre = SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'
|
||
|
|
|
||
|
|
sql_query = \
|
||
|
|
SELECT o.id, \
|
||
|
|
o.type, o.rayon as rayon_id, o.adres, o.dom, o.korpus, \
|
||
|
|
o.litera, o.srok, o.komnat, o.etazh, o.etaz_first_type, \
|
||
|
|
o.ploshad, o.ploshad_k, o.holod, \
|
||
|
|
o.stirka, o.tv, o.mebel, o.stoim, UNIX_TIMESTAMP(o.date_add) as date_add, o.date_add as date, o.ploshad_komn, o.etazh_iz, \
|
||
|
|
o.stoim_prim, o.peshkom, o.transport, o.nazv, o.opis, o.phone, \
|
||
|
|
IF((SELECT count(id) FROM objects_object_photo where object_id=o.id)>0 ,1,0) as is_photo, \
|
||
|
|
o.archive, o.sobstv, \
|
||
|
|
o.phone_search, o.id_user, UNIX_TIMESTAMP(o.date_really_add) as date_really_add, \
|
||
|
|
o.prim_srok, o.black, o.vsego_komn, o.moder, o.id_wiki, o.id_frent, o.id_ap, \
|
||
|
|
o.ellada, o.link_ap, o.id_kv, \
|
||
|
|
o.get_full_info, o.id_add_user, o.commission, o.id_ap_user_object, \
|
||
|
|
o.add_to_yandex_feed, o.add_from_archive, o.initial_object_id, \
|
||
|
|
o.initial_object_phone, o.initial_object_sobstv, o.id_moscow, \
|
||
|
|
o.type_category, o.use_in_advert, o.initial_object_stoim, \
|
||
|
|
o.operation_type, o.id_emls, o.link_emls, o.studio_flag, \
|
||
|
|
o.id_emls_user_object, o.cadastral_number, o.add_to_avito_feed, \
|
||
|
|
o.add_to_emls_feed, o.property_type_id, o.land_area, o.rent_house_type_id, \
|
||
|
|
o.country_wall_type_id, o.stoim_ky, o.lo_city_id, o.lease_deposit_id, \
|
||
|
|
o.add_to_bn_feed, o.kladr_id, o.add_to_zipal, o.add_to_domclick_feed, o.no_pets, \
|
||
|
|
o.no_child, o.rscan_source_type, o.rscan_source_link, o.land_purpose_id, \
|
||
|
|
o.land_distance, o.land_burden, o.electricity_type_id, o.gas_type_id, \
|
||
|
|
o.plumbing_type_id, o.sewerage_type_id, o.relief_type_id, o.shape_type_id, \
|
||
|
|
o.land_usage_type_id, o.lease, o.add_to_cian_feed, \
|
||
|
|
o.city_town_id, \
|
||
|
|
o.bath_type_id, o.hot_water_id, o.rubbish_chute, o.parking_type_id, o.id_rf_region, \
|
||
|
|
IF(o.fbn_id is NULL or o.fbn_id='', 0, 1) as fbn_id, \
|
||
|
|
ads.ads_url, ads.ads_id, ads.ads_source, ads.ads_source_id, ads.ads_agent, ads.obj_id, \
|
||
|
|
reg.kladr, reg.parent, reg.code, reg.name, \
|
||
|
|
sp_metro.id_metro, \
|
||
|
|
r.rayon, r.is_lo, \
|
||
|
|
s.house_type, s.house_material, s.deal_type, s.build_year, \
|
||
|
|
a.ceiling_height, a.bathroom_unit, a.balcony, a.renovation, \
|
||
|
|
a.window_view, a.apartments, a.video_url, a.loggias, a.separate_wcs, \
|
||
|
|
a.combined_wcs, a.passenger_lifts, a.cargo_lifts, a.vat_type_id, \
|
||
|
|
a.house_category, a.commercial_object_id, a.isPartsEnabled, \
|
||
|
|
a.parts_area, a.legal_address, a.isOccupied, a.is_occupied_month, \
|
||
|
|
a.is_occupied_year, a.layout_id, a.number_wet_spots, \
|
||
|
|
a.electricity_power, a.commer_condition, a.isFurniture, \
|
||
|
|
a.commer_access, a.parking_price, a.parkingIsFree, \
|
||
|
|
a.building_nazv, a.commerc_year, a.commerc_building_type_id, \
|
||
|
|
a.commerc_building_class_id, a.building_area, a.commerc_site, \
|
||
|
|
a.commerc_owned, a.commerc_building_category_id, a.building_developer, \
|
||
|
|
a.building_management_company, a.commerc_building_ventilation, \
|
||
|
|
a.commerc_building_conditioning, a.commerc_building_heating, \
|
||
|
|
a.commerc_building_fire, a.commerc_houseLineType_id, \
|
||
|
|
a.commerc_opened_id, a.commerc_infrastructure, a.column_grid, \
|
||
|
|
a.tax_number, a.floor_material_id, a.commerc_portal_id, \
|
||
|
|
a.commerc_purpose, a.gsk_nazv, a.commerc_specifications, \
|
||
|
|
a.commerc_land_category_id, a.can_land_category_change, \
|
||
|
|
a.commerc_permitted_use_id, a.can_permitted_use_change, \
|
||
|
|
a.commerc_investproject, a.is_encumbrances, a.commerc_electricity_id, \
|
||
|
|
a.can_electricity, a.commerc_gas_id, a.can_gas, a.commerc_water_id, \
|
||
|
|
a.can_water, a.commerc_sewage_id, a.can_sewage, a.commerc_driveways_id, \
|
||
|
|
a.garage_type_id, a.commerc_lift1, a.lift1_carrying, a.commerc_lift2, \
|
||
|
|
a.lift2_carrying, a.commerc_lift3, a.lift3_carrying, a.commerc_crane1, \
|
||
|
|
a.crane1_carrying, a.commerc_crane2, a.crane2_carrying, a.commerc_crane3, \
|
||
|
|
a.crane3_carrying, a.commerc_crane4, a.crane4_carrying, a.parking_id, \
|
||
|
|
a.commerc_services, a.garage_vid_id, a.boks_vid_id, \
|
||
|
|
a.commerc_status_id, a.flat_number, \
|
||
|
|
IF(o.id_frent > 0 OR ads.ads_agent = 0, 0, 1) as is_agent, \
|
||
|
|
IF(o.id_ap > 0 or o.id_add_user > 0 or ads.ads_agent > 0, 1, 0) as is_agent_ap, \
|
||
|
|
IF(o.fbn_id is not null or o.id_emls > 0 or o.id_ap > 0 or o.id_add_user > 0 or ads.ads_agent > 0, 1, 0) as is_agent_fbn, \
|
||
|
|
IF(o.fbn_id is not null or o.id_emls > 0 or o.id_ap > 0 or o.id_add_user > 0 or ads.ads_agent > 0, 1, 0) as is_agent_fbn_str, \
|
||
|
|
IF(op.currency = 0 or op.currency is null, o.stoim, op.price_avito) as price_for_order, \
|
||
|
|
IF(o.id_frent > 0 or o.fbn_id is not null or o.id_emls > 0 or o.id_ap > 0 or o.id_add_user > 0 or ads.id > 0, 1, 0) as is_agent_all, \
|
||
|
|
IF(o.archive=1 or o.id_frent <> 0 or ads.ads_agent = 0, 1, 0) as is_agent_sobtv, \
|
||
|
|
IF(o.etazh != o.etazh_iz, 1, 0) as not_last_floor, \
|
||
|
|
IF(o.type = 7, ROUND(o.stoim / o.land_area), ROUND(o.stoim / o.ploshad)) as area_price, \
|
||
|
|
l.latitude, l.longitude, \
|
||
|
|
IF(oc.country_id > 0, oc.country_id, 171) as country_id \
|
||
|
|
FROM objects as o \
|
||
|
|
LEFT JOIN ads_objects AS ads ON o.id = ads.obj_id \
|
||
|
|
LEFT JOIN rf_regions as reg ON reg.id = o.id_rf_region \
|
||
|
|
LEFT JOIN sp_metro as sp_metro ON o.id = sp_metro.id_obj \
|
||
|
|
LEFT JOIN rayon as r ON o.rayon = r.id \
|
||
|
|
LEFT JOIN sale_objects AS s ON o.id = s.object_id \
|
||
|
|
LEFT JOIN objects_additional_information as a on o.id = a.object_id \
|
||
|
|
LEFT JOIN object_location as l on l.object_id = o.id \
|
||
|
|
LEFT JOIN object_prices as op on op.object_id = o.id \
|
||
|
|
LEFT JOIN object_country as oc on oc.object_id = o.id
|
||
|
|
|
||
|
|
sql_attr_bigint = price_for_order
|
||
|
|
sql_attr_bigint = type
|
||
|
|
sql_attr_bigint = rayon_id
|
||
|
|
sql_field_string = adres
|
||
|
|
sql_field_string = dom
|
||
|
|
sql_field_string = korpus
|
||
|
|
sql_field_string = litera
|
||
|
|
sql_attr_bigint = srok
|
||
|
|
sql_attr_bigint = komnat
|
||
|
|
sql_attr_bigint = etazh
|
||
|
|
sql_attr_bigint = etaz_first_type
|
||
|
|
sql_attr_float = ploshad
|
||
|
|
sql_attr_float = ploshad_k
|
||
|
|
sql_attr_bigint = holod
|
||
|
|
sql_attr_bigint = stirka
|
||
|
|
sql_attr_bigint = tv
|
||
|
|
sql_attr_bigint = mebel
|
||
|
|
sql_attr_bigint = stoim
|
||
|
|
sql_attr_bigint = date_add
|
||
|
|
sql_field_string = date
|
||
|
|
sql_attr_float = ploshad_komn
|
||
|
|
sql_attr_bigint = etazh_iz
|
||
|
|
sql_field_string = stoim_prim
|
||
|
|
sql_attr_bigint = peshkom
|
||
|
|
sql_attr_bigint = transport
|
||
|
|
sql_field_string = nazv
|
||
|
|
sql_field_string = opis
|
||
|
|
sql_field_string = phone
|
||
|
|
sql_attr_uint = is_photo
|
||
|
|
sql_attr_bigint = area_price
|
||
|
|
sql_attr_uint = archive
|
||
|
|
sql_field_string = sobstv
|
||
|
|
sql_field_string = phone_search
|
||
|
|
sql_field_string = id_user
|
||
|
|
sql_field_string = date_really_add
|
||
|
|
sql_field_string = prim_srok
|
||
|
|
sql_attr_bigint = black
|
||
|
|
sql_field_string = vsego_komn
|
||
|
|
sql_attr_bigint = moder
|
||
|
|
sql_field_string = id_wiki
|
||
|
|
sql_attr_uint = id_frent
|
||
|
|
sql_field_string = id_ap
|
||
|
|
sql_attr_uint = ellada
|
||
|
|
sql_field_string = link_ap
|
||
|
|
sql_attr_uint = id_kv
|
||
|
|
sql_field_string = get_full_info
|
||
|
|
sql_attr_bigint = id_add_user
|
||
|
|
sql_attr_bigint = commission
|
||
|
|
sql_field_string = id_ap_user_object
|
||
|
|
sql_attr_bigint = add_to_yandex_feed
|
||
|
|
sql_attr_bigint = add_from_archive
|
||
|
|
sql_attr_bigint = initial_object_id
|
||
|
|
sql_field_string = initial_object_phone
|
||
|
|
sql_field_string = initial_object_sobstv
|
||
|
|
sql_attr_bigint = id_moscow
|
||
|
|
sql_attr_uint = type_category
|
||
|
|
sql_attr_uint = use_in_advert
|
||
|
|
sql_field_string = initial_object_stoim
|
||
|
|
sql_attr_uint = operation_type
|
||
|
|
sql_field_string = id_emls
|
||
|
|
sql_field_string = link_emls
|
||
|
|
sql_field_string = studio_flag
|
||
|
|
sql_field_string = id_emls_user_object
|
||
|
|
sql_field_string = cadastral_number
|
||
|
|
sql_field_string = add_to_avito_feed
|
||
|
|
sql_field_string = add_to_emls_feed
|
||
|
|
sql_field_string = property_type_id
|
||
|
|
sql_attr_bigint = land_area
|
||
|
|
sql_attr_bigint = rent_house_type_id
|
||
|
|
sql_attr_bigint = country_wall_type_id
|
||
|
|
sql_attr_bigint = stoim_ky
|
||
|
|
sql_attr_bigint = lo_city_id
|
||
|
|
sql_attr_bigint = lease_deposit_id
|
||
|
|
sql_field_string = add_to_bn_feed
|
||
|
|
sql_field_string = kladr_id
|
||
|
|
sql_field_string = add_to_zipal
|
||
|
|
sql_field_string = add_to_domclick_feed
|
||
|
|
sql_field_string = no_pets
|
||
|
|
sql_field_string = no_child
|
||
|
|
sql_field_string = rscan_source_type
|
||
|
|
sql_field_string = rscan_source_link
|
||
|
|
sql_field_string = land_purpose_id
|
||
|
|
sql_field_string = land_distance
|
||
|
|
sql_field_string = land_burden
|
||
|
|
sql_field_string = electricity_type_id
|
||
|
|
sql_field_string = gas_type_id
|
||
|
|
sql_field_string = plumbing_type_id
|
||
|
|
sql_field_string = sewerage_type_id
|
||
|
|
sql_field_string = relief_type_id
|
||
|
|
sql_field_string = shape_type_id
|
||
|
|
sql_field_string = land_usage_type_id
|
||
|
|
sql_field_string = lease
|
||
|
|
sql_field_string = add_to_cian_feed
|
||
|
|
sql_field_string = city_town_id
|
||
|
|
sql_field_string = bath_type_id
|
||
|
|
sql_field_string = hot_water_id
|
||
|
|
sql_field_string = rubbish_chute
|
||
|
|
sql_attr_bigint = parking_type_id
|
||
|
|
sql_field_string = id_rf_region
|
||
|
|
sql_attr_uint = fbn_id
|
||
|
|
sql_field_string = ads_url
|
||
|
|
sql_attr_string = ads_id
|
||
|
|
sql_attr_string = obj_id
|
||
|
|
sql_attr_bigint = ads_agent
|
||
|
|
sql_attr_bigint = ads_source
|
||
|
|
|
||
|
|
sql_attr_bigint = code
|
||
|
|
sql_field_string = parent
|
||
|
|
sql_field_string = kladr
|
||
|
|
sql_field_string = name
|
||
|
|
|
||
|
|
sql_attr_bigint = id_metro
|
||
|
|
|
||
|
|
sql_field_string = rayon
|
||
|
|
sql_attr_bigint = is_lo
|
||
|
|
|
||
|
|
sql_attr_bigint = house_material
|
||
|
|
sql_attr_bigint = house_type
|
||
|
|
sql_attr_bigint = deal_type
|
||
|
|
sql_attr_bigint = build_year
|
||
|
|
|
||
|
|
sql_attr_float = ceiling_height
|
||
|
|
sql_attr_uint = bathroom_unit
|
||
|
|
sql_attr_uint = balcony
|
||
|
|
sql_attr_uint = renovation
|
||
|
|
sql_attr_uint = window_view
|
||
|
|
sql_attr_uint = apartments
|
||
|
|
sql_field_string = video_url
|
||
|
|
sql_attr_uint = loggias
|
||
|
|
sql_attr_uint = separate_wcs
|
||
|
|
sql_attr_uint = combined_wcs
|
||
|
|
sql_attr_uint = passenger_lifts
|
||
|
|
sql_attr_uint = cargo_lifts
|
||
|
|
sql_attr_uint = vat_type_id
|
||
|
|
sql_attr_uint = house_category
|
||
|
|
sql_attr_uint = commercial_object_id
|
||
|
|
sql_attr_uint = isPartsEnabled
|
||
|
|
sql_attr_uint = parts_area
|
||
|
|
sql_attr_uint = legal_address
|
||
|
|
sql_attr_uint = isOccupied
|
||
|
|
sql_attr_uint = is_occupied_month
|
||
|
|
sql_attr_uint = is_occupied_year
|
||
|
|
sql_attr_uint = layout_id
|
||
|
|
sql_attr_uint = number_wet_spots
|
||
|
|
sql_attr_uint = electricity_power
|
||
|
|
sql_attr_uint = commer_condition
|
||
|
|
sql_attr_uint = isFurniture
|
||
|
|
sql_attr_uint = commer_access
|
||
|
|
sql_attr_uint = parking_price
|
||
|
|
sql_attr_uint = parkingIsFree
|
||
|
|
sql_attr_uint = building_nazv
|
||
|
|
sql_attr_uint = commerc_year
|
||
|
|
sql_attr_uint = commerc_building_type_id
|
||
|
|
sql_attr_uint = commerc_building_class_id
|
||
|
|
sql_attr_float = building_area
|
||
|
|
sql_attr_float = commerc_site
|
||
|
|
sql_attr_uint = commerc_owned
|
||
|
|
sql_attr_uint = commerc_building_category_id
|
||
|
|
sql_attr_uint = building_developer
|
||
|
|
sql_attr_uint = building_management_company
|
||
|
|
sql_attr_uint = commerc_building_ventilation
|
||
|
|
sql_attr_uint = commerc_building_conditioning
|
||
|
|
sql_attr_uint = commerc_building_heating
|
||
|
|
sql_attr_uint = commerc_building_fire
|
||
|
|
sql_attr_uint = commerc_houseLineType_id
|
||
|
|
sql_attr_uint = commerc_opened_id
|
||
|
|
sql_field_string = commerc_infrastructure
|
||
|
|
sql_attr_uint = column_grid
|
||
|
|
sql_attr_uint = tax_number
|
||
|
|
sql_attr_uint = floor_material_id
|
||
|
|
sql_attr_uint = commerc_portal_id
|
||
|
|
sql_field_string = commerc_purpose
|
||
|
|
sql_attr_uint = gsk_nazv
|
||
|
|
sql_field_string = commerc_specifications
|
||
|
|
sql_attr_uint = commerc_land_category_id
|
||
|
|
sql_attr_uint = can_land_category_change
|
||
|
|
sql_attr_uint = commerc_permitted_use_id
|
||
|
|
sql_attr_uint = can_permitted_use_change
|
||
|
|
sql_attr_uint = commerc_investproject
|
||
|
|
sql_attr_uint = is_encumbrances
|
||
|
|
sql_attr_uint = commerc_electricity_id
|
||
|
|
sql_attr_uint = can_electricity
|
||
|
|
sql_attr_uint = commerc_gas_id
|
||
|
|
sql_attr_uint = can_gas
|
||
|
|
sql_attr_uint = commerc_water_id
|
||
|
|
sql_attr_uint = can_water
|
||
|
|
sql_attr_uint = commerc_sewage_id
|
||
|
|
sql_attr_uint = can_sewage
|
||
|
|
sql_attr_uint = commerc_driveways_id
|
||
|
|
sql_attr_uint = garage_type_id
|
||
|
|
sql_attr_uint = commerc_lift1
|
||
|
|
sql_attr_uint = lift1_carrying
|
||
|
|
sql_attr_uint = commerc_lift2
|
||
|
|
sql_attr_uint = lift2_carrying
|
||
|
|
sql_attr_uint = commerc_lift3
|
||
|
|
sql_attr_uint = lift3_carrying
|
||
|
|
sql_attr_uint = commerc_crane1
|
||
|
|
sql_attr_uint = crane1_carrying
|
||
|
|
sql_attr_uint = commerc_crane2
|
||
|
|
sql_attr_uint = crane2_carrying
|
||
|
|
sql_attr_uint = commerc_crane3
|
||
|
|
sql_attr_uint = crane3_carrying
|
||
|
|
sql_attr_uint = commerc_crane4
|
||
|
|
sql_attr_uint = crane4_carrying
|
||
|
|
sql_attr_uint = parking_id
|
||
|
|
sql_attr_uint = commerc_services
|
||
|
|
sql_attr_uint = garage_vid_id
|
||
|
|
sql_attr_uint = boks_vid_id
|
||
|
|
sql_attr_uint = commerc_status_id
|
||
|
|
sql_attr_uint = flat_number
|
||
|
|
|
||
|
|
sql_attr_uint = is_agent
|
||
|
|
sql_attr_uint = is_agent_ap
|
||
|
|
sql_attr_bool = is_agent_fbn
|
||
|
|
sql_field_string = is_agent_fbn_str
|
||
|
|
sql_attr_uint = is_agent_all
|
||
|
|
sql_attr_uint = is_agent_sobtv
|
||
|
|
sql_attr_uint = not_last_floor
|
||
|
|
|
||
|
|
sql_attr_float = latitude
|
||
|
|
sql_attr_float = longitude
|
||
|
|
|
||
|
|
sql_attr_uint = country_id
|
||
|
|
|
||
|
|
|
||
|
|
sql_query_post_index = \
|
||
|
|
update objects SET is_main = 1 WHERE is_main = 0;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
index objects
|
||
|
|
{
|
||
|
|
source = objects
|
||
|
|
path = /opt/sphinx/index/objects.main
|
||
|
|
}
|
||
|
|
|
||
|
|
source objects_delta : objects
|
||
|
|
{
|
||
|
|
sql_query_pre = SET NAMES 'utf8'
|
||
|
|
sql_query_pre = SET CHARACTER SET utf8
|
||
|
|
sql_query_pre = SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'
|
||
|
|
|
||
|
|
sql_query = \
|
||
|
|
SELECT o.id, \
|
||
|
|
o.type, o.rayon as rayon_id, o.adres, o.dom, o.korpus, \
|
||
|
|
o.litera, o.srok, o.komnat, o.etazh, o.etaz_first_type, \
|
||
|
|
o.ploshad, o.ploshad_k, o.holod, \
|
||
|
|
o.stirka, o.tv, o.mebel, o.stoim, UNIX_TIMESTAMP(o.date_add) as date_add, o.date_add as date, o.ploshad_komn, o.etazh_iz, \
|
||
|
|
o.stoim_prim, o.peshkom, o.transport, o.nazv, o.opis, o.phone, \
|
||
|
|
IF((SELECT count(id) FROM objects_object_photo where object_id=o.id)>0 ,1,0) as is_photo, \
|
||
|
|
o.archive, o.sobstv, \
|
||
|
|
o.phone_search, o.id_user, UNIX_TIMESTAMP(o.date_really_add) as date_really_add, \
|
||
|
|
o.prim_srok, o.black, o.vsego_komn, o.moder, o.id_wiki, o.id_frent, o.id_ap, \
|
||
|
|
o.ellada, o.link_ap, o.id_kv, \
|
||
|
|
o.get_full_info, o.id_add_user, o.commission, o.id_ap_user_object, \
|
||
|
|
o.add_to_yandex_feed, o.add_from_archive, o.initial_object_id, \
|
||
|
|
o.initial_object_phone, o.initial_object_sobstv, o.id_moscow, \
|
||
|
|
o.type_category, o.use_in_advert, o.initial_object_stoim, \
|
||
|
|
o.operation_type, o.id_emls, o.link_emls, o.studio_flag, \
|
||
|
|
o.id_emls_user_object, o.cadastral_number, o.add_to_avito_feed, \
|
||
|
|
o.add_to_emls_feed, o.property_type_id, o.land_area, o.rent_house_type_id, \
|
||
|
|
o.country_wall_type_id, o.stoim_ky, o.lo_city_id, o.lease_deposit_id, \
|
||
|
|
o.add_to_bn_feed, o.kladr_id, o.add_to_zipal, o.add_to_domclick_feed, o.no_pets, \
|
||
|
|
o.no_child, o.rscan_source_type, o.rscan_source_link, o.land_purpose_id, \
|
||
|
|
o.land_distance, o.land_burden, o.electricity_type_id, o.gas_type_id, \
|
||
|
|
o.plumbing_type_id, o.sewerage_type_id, o.relief_type_id, o.shape_type_id, \
|
||
|
|
o.land_usage_type_id, o.lease, o.add_to_cian_feed, \
|
||
|
|
o.city_town_id, \
|
||
|
|
o.bath_type_id, o.hot_water_id, o.rubbish_chute, o.parking_type_id, o.id_rf_region, \
|
||
|
|
IF(o.fbn_id is NULL or o.fbn_id='', 0, 1) as fbn_id, \
|
||
|
|
ads.ads_url, ads.ads_id, ads.ads_source, ads.ads_source_id, ads.ads_agent, ads.obj_id, \
|
||
|
|
reg.kladr, reg.parent, reg.code, reg.name, \
|
||
|
|
sp_metro.id_metro, \
|
||
|
|
r.rayon, r.is_lo, \
|
||
|
|
s.house_type, s.house_material, s.deal_type, s.build_year, \
|
||
|
|
a.ceiling_height, a.bathroom_unit, a.balcony, a.renovation, \
|
||
|
|
a.window_view, a.apartments, a.video_url, a.loggias, a.separate_wcs, \
|
||
|
|
a.combined_wcs, a.passenger_lifts, a.cargo_lifts, a.vat_type_id, \
|
||
|
|
a.house_category, a.commercial_object_id, a.isPartsEnabled, \
|
||
|
|
a.parts_area, a.legal_address, a.isOccupied, a.is_occupied_month, \
|
||
|
|
a.is_occupied_year, a.layout_id, a.number_wet_spots, \
|
||
|
|
a.electricity_power, a.commer_condition, a.isFurniture, \
|
||
|
|
a.commer_access, a.parking_price, a.parkingIsFree, \
|
||
|
|
a.building_nazv, a.commerc_year, a.commerc_building_type_id, \
|
||
|
|
a.commerc_building_class_id, a.building_area, a.commerc_site, \
|
||
|
|
a.commerc_owned, a.commerc_building_category_id, a.building_developer, \
|
||
|
|
a.building_management_company, a.commerc_building_ventilation, \
|
||
|
|
a.commerc_building_conditioning, a.commerc_building_heating, \
|
||
|
|
a.commerc_building_fire, a.commerc_houseLineType_id, \
|
||
|
|
a.commerc_opened_id, a.commerc_infrastructure, a.column_grid, \
|
||
|
|
a.tax_number, a.floor_material_id, a.commerc_portal_id, \
|
||
|
|
a.commerc_purpose, a.gsk_nazv, a.commerc_specifications, \
|
||
|
|
a.commerc_land_category_id, a.can_land_category_change, \
|
||
|
|
a.commerc_permitted_use_id, a.can_permitted_use_change, \
|
||
|
|
a.commerc_investproject, a.is_encumbrances, a.commerc_electricity_id, \
|
||
|
|
a.can_electricity, a.commerc_gas_id, a.can_gas, a.commerc_water_id, \
|
||
|
|
a.can_water, a.commerc_sewage_id, a.can_sewage, a.commerc_driveways_id, \
|
||
|
|
a.garage_type_id, a.commerc_lift1, a.lift1_carrying, a.commerc_lift2, \
|
||
|
|
a.lift2_carrying, a.commerc_lift3, a.lift3_carrying, a.commerc_crane1, \
|
||
|
|
a.crane1_carrying, a.commerc_crane2, a.crane2_carrying, a.commerc_crane3, \
|
||
|
|
a.crane3_carrying, a.commerc_crane4, a.crane4_carrying, a.parking_id, \
|
||
|
|
a.commerc_services, a.garage_vid_id, a.boks_vid_id, \
|
||
|
|
a.commerc_status_id, a.flat_number, \
|
||
|
|
IF(o.id_frent > 0 OR ads.ads_agent = 0, 0, 1) as is_agent, \
|
||
|
|
IF(o.id_ap > 0 or o.id_add_user > 0 or ads.ads_agent > 0, 1, 0) as is_agent_ap, \
|
||
|
|
IF(o.fbn_id is not null or o.id_emls > 0 or o.id_ap > 0 or o.id_add_user > 0 or ads.ads_agent > 0, 1, 0) as is_agent_fbn, \
|
||
|
|
IF(o.fbn_id is not null or o.id_emls > 0 or o.id_ap > 0 or o.id_add_user > 0 or ads.ads_agent > 0, 1, 0) as is_agent_fbn_str, \
|
||
|
|
IF(o.id_frent > 0 or o.fbn_id is not null or o.id_emls > 0 or o.id_ap > 0 or o.id_add_user > 0 or ads.id > 0, 1, 0) as is_agent_all, \
|
||
|
|
IF(o.archive=1 or o.id_frent <> 0 or ads.ads_agent = 0, 1, 0) as is_agent_sobtv, \
|
||
|
|
IF(o.etazh != o.etazh_iz, 1, 0) as not_last_floor, \
|
||
|
|
IF(op.currency = 0 or op.currency is null, o.stoim, op.price_avito) as price_for_order, \
|
||
|
|
IF(o.type = 7, o.stoim / o.land_area, o.stoim / o.ploshad) as area_price, \
|
||
|
|
l.latitude, l.longitude, \
|
||
|
|
IF(oc.country_id > 0, oc.country_id, 171) as country_id \
|
||
|
|
FROM objects as o \
|
||
|
|
LEFT JOIN ads_objects AS ads ON o.id = ads.obj_id \
|
||
|
|
LEFT JOIN rf_regions as reg ON reg.id = o.id_rf_region \
|
||
|
|
LEFT JOIN sp_metro as sp_metro ON o.id = sp_metro.id_obj \
|
||
|
|
LEFT JOIN rayon as r ON o.rayon = r.id \
|
||
|
|
LEFT JOIN sale_objects AS s ON o.id = s.object_id \
|
||
|
|
LEFT JOIN objects_additional_information as a on o.id = a.object_id \
|
||
|
|
LEFT JOIN object_location as l on l.object_id = o.id \
|
||
|
|
LEFT JOIN object_country as oc on oc.object_id = o.id \
|
||
|
|
LEFT JOIN object_prices as op on op.object_id = o.id \
|
||
|
|
WHERE is_main = 0
|
||
|
|
|
||
|
|
sql_attr_bigint = price_for_order
|
||
|
|
sql_attr_bigint = type
|
||
|
|
sql_attr_bigint = rayon_id
|
||
|
|
sql_field_string = adres
|
||
|
|
sql_field_string = dom
|
||
|
|
sql_field_string = korpus
|
||
|
|
sql_field_string = litera
|
||
|
|
sql_attr_bigint = srok
|
||
|
|
sql_attr_bigint = komnat
|
||
|
|
sql_attr_bigint = etazh
|
||
|
|
sql_attr_bigint = etaz_first_type
|
||
|
|
sql_attr_float = ploshad
|
||
|
|
sql_attr_float = ploshad_k
|
||
|
|
sql_attr_bigint = holod
|
||
|
|
sql_attr_bigint = stirka
|
||
|
|
sql_attr_bigint = tv
|
||
|
|
sql_attr_bigint = mebel
|
||
|
|
sql_attr_bigint = stoim
|
||
|
|
sql_attr_bigint = date_add
|
||
|
|
sql_field_string = date
|
||
|
|
sql_attr_float = ploshad_komn
|
||
|
|
sql_attr_bigint = etazh_iz
|
||
|
|
sql_field_string = stoim_prim
|
||
|
|
sql_attr_bigint = peshkom
|
||
|
|
sql_attr_bigint = transport
|
||
|
|
sql_field_string = nazv
|
||
|
|
sql_field_string = opis
|
||
|
|
sql_field_string = phone
|
||
|
|
sql_attr_uint = is_photo
|
||
|
|
sql_attr_bigint = area_price
|
||
|
|
sql_attr_uint = archive
|
||
|
|
sql_field_string = sobstv
|
||
|
|
sql_field_string = phone_search
|
||
|
|
sql_field_string = id_user
|
||
|
|
sql_field_string = date_really_add
|
||
|
|
sql_field_string = prim_srok
|
||
|
|
sql_attr_bigint = black
|
||
|
|
sql_field_string = vsego_komn
|
||
|
|
sql_attr_bigint = moder
|
||
|
|
sql_field_string = id_wiki
|
||
|
|
sql_attr_uint = id_frent
|
||
|
|
sql_field_string = id_ap
|
||
|
|
sql_attr_uint = ellada
|
||
|
|
sql_field_string = link_ap
|
||
|
|
sql_attr_uint = id_kv
|
||
|
|
sql_field_string = get_full_info
|
||
|
|
sql_attr_bigint = id_add_user
|
||
|
|
sql_attr_bigint = commission
|
||
|
|
sql_field_string = id_ap_user_object
|
||
|
|
sql_attr_bigint = add_to_yandex_feed
|
||
|
|
sql_attr_bigint = add_from_archive
|
||
|
|
sql_attr_bigint = initial_object_id
|
||
|
|
sql_field_string = initial_object_phone
|
||
|
|
sql_field_string = initial_object_sobstv
|
||
|
|
sql_attr_bigint = id_moscow
|
||
|
|
sql_attr_uint = type_category
|
||
|
|
sql_attr_uint = use_in_advert
|
||
|
|
sql_field_string = initial_object_stoim
|
||
|
|
sql_attr_uint = operation_type
|
||
|
|
sql_field_string = id_emls
|
||
|
|
sql_field_string = link_emls
|
||
|
|
sql_field_string = studio_flag
|
||
|
|
sql_field_string = id_emls_user_object
|
||
|
|
sql_field_string = cadastral_number
|
||
|
|
sql_field_string = add_to_avito_feed
|
||
|
|
sql_field_string = add_to_emls_feed
|
||
|
|
sql_field_string = property_type_id
|
||
|
|
sql_attr_bigint = land_area
|
||
|
|
sql_attr_bigint = rent_house_type_id
|
||
|
|
sql_attr_bigint = country_wall_type_id
|
||
|
|
sql_attr_bigint = stoim_ky
|
||
|
|
sql_attr_bigint = lo_city_id
|
||
|
|
sql_attr_bigint = lease_deposit_id
|
||
|
|
sql_field_string = add_to_bn_feed
|
||
|
|
sql_field_string = kladr_id
|
||
|
|
sql_field_string = add_to_zipal
|
||
|
|
sql_field_string = add_to_domclick_feed
|
||
|
|
sql_field_string = no_pets
|
||
|
|
sql_field_string = no_child
|
||
|
|
sql_field_string = rscan_source_type
|
||
|
|
sql_field_string = rscan_source_link
|
||
|
|
sql_field_string = land_purpose_id
|
||
|
|
sql_field_string = land_distance
|
||
|
|
sql_field_string = land_burden
|
||
|
|
sql_field_string = electricity_type_id
|
||
|
|
sql_field_string = gas_type_id
|
||
|
|
sql_field_string = plumbing_type_id
|
||
|
|
sql_field_string = sewerage_type_id
|
||
|
|
sql_field_string = relief_type_id
|
||
|
|
sql_field_string = shape_type_id
|
||
|
|
sql_field_string = land_usage_type_id
|
||
|
|
sql_field_string = lease
|
||
|
|
sql_field_string = add_to_cian_feed
|
||
|
|
sql_field_string = city_town_id
|
||
|
|
sql_field_string = bath_type_id
|
||
|
|
sql_field_string = hot_water_id
|
||
|
|
sql_field_string = rubbish_chute
|
||
|
|
sql_attr_bigint = parking_type_id
|
||
|
|
sql_field_string = id_rf_region
|
||
|
|
sql_attr_uint = fbn_id
|
||
|
|
sql_field_string = ads_url
|
||
|
|
sql_attr_string = ads_id
|
||
|
|
sql_attr_string = obj_id
|
||
|
|
sql_attr_bigint = ads_agent
|
||
|
|
sql_attr_bigint = ads_source
|
||
|
|
sql_attr_bigint = code
|
||
|
|
sql_field_string = parent
|
||
|
|
sql_field_string = kladr
|
||
|
|
sql_field_string = name
|
||
|
|
sql_attr_bigint = id_metro
|
||
|
|
sql_field_string = rayon
|
||
|
|
sql_attr_bigint = is_lo
|
||
|
|
sql_attr_bigint = house_material
|
||
|
|
sql_attr_bigint = house_type
|
||
|
|
sql_attr_bigint = deal_type
|
||
|
|
sql_attr_bigint = build_year
|
||
|
|
sql_attr_float = ceiling_height
|
||
|
|
sql_attr_uint = bathroom_unit
|
||
|
|
sql_attr_uint = balcony
|
||
|
|
sql_attr_uint = renovation
|
||
|
|
sql_attr_uint = window_view
|
||
|
|
sql_attr_uint = apartments
|
||
|
|
sql_field_string = video_url
|
||
|
|
sql_attr_uint = loggias
|
||
|
|
sql_attr_uint = separate_wcs
|
||
|
|
sql_attr_uint = combined_wcs
|
||
|
|
sql_attr_uint = passenger_lifts
|
||
|
|
sql_attr_uint = cargo_lifts
|
||
|
|
sql_attr_uint = vat_type_id
|
||
|
|
sql_attr_uint = house_category
|
||
|
|
sql_attr_uint = commercial_object_id
|
||
|
|
sql_attr_uint = isPartsEnabled
|
||
|
|
sql_attr_uint = parts_area
|
||
|
|
sql_attr_uint = legal_address
|
||
|
|
sql_attr_uint = isOccupied
|
||
|
|
sql_attr_uint = is_occupied_month
|
||
|
|
sql_attr_uint = is_occupied_year
|
||
|
|
sql_attr_uint = layout_id
|
||
|
|
sql_attr_uint = number_wet_spots
|
||
|
|
sql_attr_uint = electricity_power
|
||
|
|
sql_attr_uint = commer_condition
|
||
|
|
sql_attr_uint = isFurniture
|
||
|
|
sql_attr_uint = commer_access
|
||
|
|
sql_attr_float = parking_price
|
||
|
|
sql_attr_uint = parkingIsFree
|
||
|
|
sql_attr_uint = building_nazv
|
||
|
|
sql_attr_uint = commerc_year
|
||
|
|
sql_attr_uint = commerc_building_type_id
|
||
|
|
sql_attr_uint = commerc_building_class_id
|
||
|
|
sql_attr_float = building_area
|
||
|
|
sql_attr_float = commerc_site
|
||
|
|
sql_attr_uint = commerc_owned
|
||
|
|
sql_attr_uint = commerc_building_category_id
|
||
|
|
sql_attr_uint = building_developer
|
||
|
|
sql_attr_uint = building_management_company
|
||
|
|
sql_attr_uint = commerc_building_ventilation
|
||
|
|
sql_attr_uint = commerc_building_conditioning
|
||
|
|
sql_attr_uint = commerc_building_heating
|
||
|
|
sql_attr_uint = commerc_building_fire
|
||
|
|
sql_attr_uint = commerc_houseLineType_id
|
||
|
|
sql_attr_uint = commerc_opened_id
|
||
|
|
sql_field_string = commerc_infrastructure
|
||
|
|
sql_attr_uint = column_grid
|
||
|
|
sql_attr_uint = tax_number
|
||
|
|
sql_attr_uint = floor_material_id
|
||
|
|
sql_attr_uint = commerc_portal_id
|
||
|
|
sql_field_string = commerc_purpose
|
||
|
|
sql_attr_uint = gsk_nazv
|
||
|
|
sql_field_string = commerc_specifications
|
||
|
|
sql_attr_uint = commerc_land_category_id
|
||
|
|
sql_attr_uint = can_land_category_change
|
||
|
|
sql_attr_uint = commerc_permitted_use_id
|
||
|
|
sql_attr_uint = can_permitted_use_change
|
||
|
|
sql_attr_uint = commerc_investproject
|
||
|
|
sql_attr_uint = is_encumbrances
|
||
|
|
sql_attr_uint = commerc_electricity_id
|
||
|
|
sql_attr_uint = can_electricity
|
||
|
|
sql_attr_uint = commerc_gas_id
|
||
|
|
sql_attr_uint = can_gas
|
||
|
|
sql_attr_uint = commerc_water_id
|
||
|
|
sql_attr_uint = can_water
|
||
|
|
sql_attr_uint = commerc_sewage_id
|
||
|
|
sql_attr_uint = can_sewage
|
||
|
|
sql_attr_uint = commerc_driveways_id
|
||
|
|
sql_attr_uint = garage_type_id
|
||
|
|
sql_attr_uint = commerc_lift1
|
||
|
|
sql_attr_uint = lift1_carrying
|
||
|
|
sql_attr_uint = commerc_lift2
|
||
|
|
sql_attr_uint = lift2_carrying
|
||
|
|
sql_attr_uint = commerc_lift3
|
||
|
|
sql_attr_uint = lift3_carrying
|
||
|
|
sql_attr_uint = commerc_crane1
|
||
|
|
sql_attr_uint = crane1_carrying
|
||
|
|
sql_attr_uint = commerc_crane2
|
||
|
|
sql_attr_uint = crane2_carrying
|
||
|
|
sql_attr_uint = commerc_crane3
|
||
|
|
sql_attr_uint = crane3_carrying
|
||
|
|
sql_attr_uint = commerc_crane4
|
||
|
|
sql_attr_uint = crane4_carrying
|
||
|
|
sql_attr_uint = parking_id
|
||
|
|
sql_attr_uint = commerc_services
|
||
|
|
sql_attr_uint = garage_vid_id
|
||
|
|
sql_attr_uint = boks_vid_id
|
||
|
|
sql_attr_uint = commerc_status_id
|
||
|
|
sql_attr_uint = flat_number
|
||
|
|
sql_attr_uint = is_agent
|
||
|
|
sql_attr_uint = is_agent_ap
|
||
|
|
sql_attr_bool = is_agent_fbn
|
||
|
|
sql_field_string = is_agent_fbn_str
|
||
|
|
sql_attr_uint = is_agent_all
|
||
|
|
sql_attr_uint = is_agent_sobtv
|
||
|
|
sql_attr_uint = not_last_floor
|
||
|
|
sql_attr_float = latitude
|
||
|
|
sql_attr_float = longitude
|
||
|
|
sql_attr_uint = country_id
|
||
|
|
}
|
||
|
|
|
||
|
|
index objects_delta : objects
|
||
|
|
{
|
||
|
|
source = objects_delta
|
||
|
|
path = /opt/sphinx/index/objects.delta
|
||
|
|
}
|
||
|
|
|
||
|
|
searchd
|
||
|
|
{
|
||
|
|
listen = 9312
|
||
|
|
listen = 9306:mysql41
|
||
|
|
log = /opt/sphinx/log/sphinx-searchd.log
|
||
|
|
query_log = /opt/sphinx/log/sphinx-query.log
|
||
|
|
query_log_format = sphinxql
|
||
|
|
read_timeout = 5
|
||
|
|
max_children = 15
|
||
|
|
pid_file = /opt/sphinx/index/searchd.pid
|
||
|
|
seamless_rotate = 1
|
||
|
|
preopen_indexes = 1
|
||
|
|
unlink_old = 1
|
||
|
|
workers = threads # Нужно для RT-индексов (Real-Time)
|
||
|
|
binlog_path = /opt/sphinx/binlog # Укажите правильный путь или отключите binlog
|
||
|
|
}
|