Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

GUI for AdvancedQuery with some extensions - searching the easy way for Plone

Project Description


This package provides a complete user interface for AdvancedQuery by Dieter Maurer. It enables you to use a powerful language to search for content. It also provides functionality to save parametrized and conditional queries for later use (predefined queries). Look at the examples for more information.


  • Put anthill.querytool in eggs= and zcml=
  • Make sure that AdvancedQuery is installed (works for Plone 3.x)

Example query

A query could look like that:

    Eq('SearchableText', '$text'),
    ~Generic('path', {'query':'Members', 'level':-1}),

        In('portal_types', $allowed_types),

        In('portal_types', ['Folder', 'Document']),

    Ge('start_date', TODAY)

Here you see that you can parametrize queries (variable expansion enabled using $), you also can use defined constants (only one currently active called TODAY where TODAY=DateTime()) and you can put conditionals in your queries.

Conditionals are a powerful way to enable or disable certain parts of your query. The if statement checks if a given parameter exists. You can also replace if with ifnot that only activates the given part if the parameter is not set.

You can save this query and call it later on like that:

context.query_tool.executePredefinedQuery('contentsearch', text='Test*', allowed_types=['Folder', ])


This release adds some additional query operators (defined in The following operators are currently available:

  • Count counts items in search results. (e.g. Count(Eq(‘SearchableText’, ‘moses’)) )
  • Sum computes sum over int result (e.g. Sum(Ge(‘commentcount’, 10)) )
  • Avg computes the average over an int result (e.g. Avg(Ge(‘userviews’, 1)) )

Look at for examples on how to create your own operators.

Submit query

Predefined queries


  • Markus Reinsch for coding the predecessor of this package
  • Dieter Maurer for his great implementation of AdvancedQuery


0.2 - 2009/08/21

  • Revamped documentation [spamsch]

0.1 - 2009/08/20

  • Initial release

Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(16.6 kB) Copy SHA256 Hash SHA256
Source None Aug 20, 2009

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers