Exemplo n.º 1
0
Arquivo: app.py Projeto: gesso15/HtH
def query_constructor(query_terms='objproddate_begin_dt:[* TO *]' +
                      'AND objproddate_end_dt:[* TO *]' +
                      'AND blob_ss:[* TO *]',
                      search_filter="objname_s, objfcp_s," +
                      "objproddate_begin_dt, objproddate_end_dt," +
                      "objproddate_s, objassoccult_ss, id, blob_ss," +
                      "objdescr_s, objfilecode_ss, objmusno_s",
                      max_results=100):
    return api_utils.query(q=query_terms,
                           fl=search_filter,
                           rows=max_results)['response']
Exemplo n.º 2
0
def query_constructor(query_terms='objproddate_begin_dt:[* TO *]' +
                      'AND objproddate_end_dt:[* TO *]' +
                      'AND blob_ss:[* TO *]',
                      search_filter="objname_s, objfcp_s," +
                      "objproddate_begin_dt, objproddate_end_dt," +
                      "objproddate_s, objassoccult_ss, id, blob_ss," +
                      "objdescr_s, objfilecode_ss, objmusno_s",
                      max_results=100):
    # result = query(q='''objtype_s:"archaeology" AND objproddate_txt:(+Manchu +(Qing) +Dynasty) AND blob_ss:[* TO *]''', fl="blob_ss,objname_s,objproddate_txt", rows=ROWS+1)['response']
    # result = api_utils.query(q='''objtype_s:"ethnography" AND (objfilecode_ss:"2.2 Personal Adornments and Accoutrements") AND blob_ss:[* TO *]''', fl="", rows=ROWS+1)['response']
    return api_utils.query(q=query_terms, fl=search_filter,
                           rows=max_results)['response']
Exemplo n.º 3
0
def query_constructor(query_terms='objproddate_begin_dt:[* TO *]' +
                      'AND objproddate_end_dt:[* TO *]' +
                      'AND blob_ss:[* TO *]',
                      search_filter="objname_s, objfcp_s," +
                      "objproddate_begin_dt, objproddate_end_dt," +
                      "objproddate_s, objassoccult_ss, id, blob_ss," +
                      "objdescr_s, objfilecode_ss, objmusno_s",
                      max_results=100):
    # result = query(q='''objtype_s:"archaeology" AND objproddate_txt:(+Manchu +(Qing) +Dynasty) AND blob_ss:[* TO *]''', fl="blob_ss,objname_s,objproddate_txt", rows=ROWS+1)['response']
    # result = api_utils.query(q='''objtype_s:"ethnography" AND (objfilecode_ss:"2.2 Personal Adornments and Accoutrements") AND blob_ss:[* TO *]''', fl="", rows=ROWS+1)['response']
    return api_utils.query(q=query_terms,
                           fl=search_filter,
                           rows=max_results)['response']