Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Convert from whoosh results list to
a list of dictionaries with a key/value pair for
each schema column

        def whoosh2dict(hits):
    """Convert from whoosh results list to
    a list of dictionaries with a key/value pair for
    each schema column"""
    m = []
    for hit in hits:
        d = {}
        for k, v in hit.items():
            d[k] = v
        m.append(d)
    return m
        


src/i/n/Internet-in-a-Box-0.5.10/iiab/wikipedia_search.py   Internet-in-a-Box(Download)
# Internet-in-a-Box System
# By Braddock Gaskill, 16 Feb 2013
from whoosh.qparser import QueryParser
 
from utils import whoosh2dict, whoosh_open_dir_32_or_64
                                          sortedby="score", reverse=True)
            #r = [x.items() for x in results]
            r = whoosh2dict(results)
        ix.close()
        return r

src/i/n/Internet-in-a-Box-0.5.10/iiab/map_search.py   Internet-in-a-Box(Download)
from whoosh import sorting
 
from utils import whoosh2dict
 
 
                results = searcher.search(query, limit=None, sortedby=population_sort_facet)
            #r = [x.items() for x in results]
            r = whoosh2dict(results)
        ix.close()
        # experiment with tucking away content for display in popup.