优化均价算法
This commit is contained in:
@@ -63,7 +63,7 @@ def get_seawater_index_name(city, region):
|
||||
return es.get_index_name(city, region)
|
||||
|
||||
|
||||
@timer
|
||||
|
||||
def findHouse(query, fields=None):
|
||||
# s = time.time()
|
||||
seawater105 = get_collection("fangjia", "seawater", config.get_seawater_host(), 27777)
|
||||
@@ -76,7 +76,7 @@ def findHouse(query, fields=None):
|
||||
# print('flag1')
|
||||
lt = 1000
|
||||
# seawater.find(query,{"p_date":-1}).sort([("p_date",-1)])
|
||||
pos = list(seawater105.find(query).limit(lt))
|
||||
pos = list(seawater105.find(query, fields).limit(lt))
|
||||
data = pandas.DataFrame(pos)
|
||||
del pos
|
||||
# print("==================>", time.time() - s)
|
||||
@@ -91,8 +91,8 @@ def findHouse(query, fields=None):
|
||||
raise Exception("样本查询失败!")
|
||||
|
||||
|
||||
@timer
|
||||
def find_house_from_elastic_search(city, region, alias, roots=None, pdate=None, cat="sell", limit=100):
|
||||
|
||||
def find_house_from_elastic_search(city, region, alias, roots=None, pdate=None, cat="sell", limit=1000):
|
||||
index_name = get_seawater_index_name(city, region)
|
||||
|
||||
routing_set = [cat + "_" + city + "_" + region + "_" + alia for alia in alias]
|
||||
@@ -132,7 +132,7 @@ def find_house_from_elastic_search(city, region, alias, roots=None, pdate=None,
|
||||
return pandas.DataFrame([doc["_source"] for doc in response["hits"]["hits"]])
|
||||
|
||||
|
||||
@timer
|
||||
|
||||
def find_sample_pool(query, fields=None):
|
||||
# s = time.time()
|
||||
seawater105 = get_collection("fangjia", "seawater", config.get_seawater_host(), 27777)
|
||||
@@ -221,7 +221,7 @@ def dis_feature(query, fields=None):
|
||||
|
||||
raise Exception("yang ben cha xun shi bai1")
|
||||
|
||||
@timer
|
||||
|
||||
def find_seaweed(query, fields=None):
|
||||
# dirlt=p[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user