2013-01-17 23 views

回答

0

添加軍銜表達了return_fields參數的名稱:

import boto 
conn = boto.connect_cloudsearch(key,secret) 
domain = conn.create_domain('domain_name') 
search_service = domain.get_search_service() 

results = search_service.search(query, return_fields=['text_relevance','name_of_custom_rank_expression']) 

for result in results: 
    score = result['data']['name_of_custom_rank_expression'][0]