Service Architecture

The core component of a PuppyIR based application is a search service. A search service contains a variety of individual components that, when combined together, allow for searching and retrieving results from a defined search engine. These search services are stored and managed by a service manager. The diagram below shows the structure of a search service from its owner, the service manager, to all the individual components contained within the search service.


The basic architecture of a PuppyIR service showing how all the components relate to each other.

Description of the components

The roles of the components are as follows:

  • Service Manager: manages a collection of SearchServices.
  • Config: local configuration options (e.g. for proxies, API keys and log files).
  • Search Service: a single search service, with its own QueryLogger, QueryFilter collection, SearchEngine and ResultFilter collection.
  • Query Logger: logs queries to file.
  • Query Pipeline: see next section.
  • Search Engine: a search engine wrapper (e.g. Bing) to be searched.
  • Result Pipeline: see next section.


Within a search service there are two pipe structures: the Query and Result pipelines. These handle, respectively, the processing of a users query and the processing of the results of a query. The diagram below shows the basic flow between a user issuing a query and their results being displayed.


The flow of query to results going through the two pipelines.

Within each of these pipelines there are filters and modifiers. Filters are executed first and then, following this, the modifiers are executed. The distinction between a filter and a modifier is as follows:

  • Filters: these reject or accept a query, or result, based on a defined criteria. For example a blacklist filter rejects queries containing one or more blacklisted words.
  • Modifiers: these change the content of a query, or result, based on a defined behaviour. For example, appending “for kids” to every query.

There are many different filters and modifiers available for both of these pipelines, please consult the PuppyIR API Reference page for details of what is available.

The Query and Response (search results) formats

Referring to the Pipelines diagram above, a search service is passed a query in the ‘Query’ model format and returns results in the ‘Response’ model format. Both of these formats are implementations of the OpenSearch specification; for more details, see the links below:

Table Of Contents

Previous topic

Running Prototypes

Next topic

Building a Standalone PuppyIR Service

This Page