def process(self, a, q, path): # turn the incoming arguments to the args parameter initial_request, args = self._construct_args(a, q) # fold in the free text search options if relevant implicit_facets = self._add_implicit_facets(path, args) if len(implicit_facets) > 0: initial_request = False properties = self._ui_properties(args, implicit_facets) # create a search engine connection and get the results back index_factory = IndexFactory(self.config) s = index_factory.get_index_dao() if initial_request: properties['results'] = s.initial(args) else: properties['results'] = s.search(args) if args.has_key("search"): properties['q'] = args['search'] else: properties['q'] = "" return properties
def process(self, a, q, id): # turn the incoming arguments to the args parameter initial_request, args = self._construct_args(a, q) properties = self._ui_properties(args) index_factory = IndexFactory(self.config) s = index_factory.get_index_dao() properties['record'] = s.record(id) return properties