Skip to main content
Ctrl+K

Plone Documentation v6

  • Overview
  • Get started
  • Admin guide
    • Install Plone with Cookieplone
    • Install Plone with Buildout
    • Install Plone with pip
    • Run Plone
    • Add a Plone site
    • Zope manager users
    • Configure Zope
    • Install Plone add-ons
    • Export and import site data
    • Override core Plone packages
    • Back up and restore a Plone buildout
    • Upgrade Plone
    • Containers
      • Official Images
        • plone/plone-backend
        • plone/plone-frontend
        • plone/plone-zeo
      • Examples of Plone 6 using containers
        • nginx, Frontend, Backend container example
        • nginx, Frontend, Backend, ZEO container example
        • nginx, Frontend, Backend, PostgreSQL container example
        • nginx, Plone Classic container example
        • HAProxy, Backend, ZEO container example
        • Traefik Proxy, Frontend, Backend, Varnish container example
      • Docker recipes
  • Developer guide
    • Develop Volto add-ons
    • Create a Plone distribution
    • Standardize Python project configuration
  • Deployment
    • Components
    • Server environment
    • Continuous integration and deployment
    • Orchestration
    • Optimize and tune
    • Caching
      • Installation
      • Control panel
      • Caching profiles
      • Rulesets and caching operations
      • Caching proxies
      • RAM cache
      • ETags
      • Composite views
      • REST API support
  • Volto UI
    • Development
      • Overview
      • Create a Volto project without a backend
      • Develop Volto add-ons
        • Install an add-on in Volto
        • Install an add-on in development mode in Volto 18
        • Install an add-on in development mode in Volto 17
        • Load configuration from add-ons
        • Create an add-on for Volto 18
        • Create an add-on for Volto 17
        • Test add-ons in Volto 18
        • Test add-ons in Volto 17
        • Extend webpack setup from an add-on
        • Extend ESLint configuration from an add-on
        • Troubleshoot untranspiled add-on dependencies
        • Add-on internationalization
        • Best practices for add-ons
        • Create a Volto theme add-on
        • Add static files from your add-on to your build
      • Folder structure
      • How to use environment variables
      • Customizing Components
      • Customizing Volto Views
      • Creating Volto Views
      • Images
      • Internationalization
      • Custom Express middleware
      • Lazy loading
      • AppExtras component
      • Context navigation component
      • Pluggables framework
      • Forms and widgets
      • How to restrict blocks
      • Color picker widget
    • Configuration
      • The configuration registry
      • Settings reference guide
      • Experimental features
      • Zero configuration builds
      • Component registry
      • Internal proxy to content backend API
      • Backend configuration
      • Programmatically define the active add-ons and theme
      • volto-slate
        • volto-slate API
        • Editor Configuration
        • How to write a Slate editor plugin
      • Multilingual
      • Working copy support
      • Environment variables
      • API expanders
      • Locking support
      • Slots
      • Client side form field validation
    • Theming
      • About Semantic UI
      • Semantic UI Theming
      • How does the theming engine work?
      • Theming Strategy
      • Custom Styling
      • Using third party libraries and themes other than semantic-ui
      • Customize a base theme
    • Blocks
      • Blocks Introduction
      • Blocks anatomy
      • Blocks settings
      • Blocks - Edit components
      • Block style wrapper
      • Block extensions mechanism
      • Server-side rendering for async blocks
      • Core Blocks developer notes
        • Listing block
        • Teaser Block
        • Grid block
        • Container
      • Volto block examples
        • Block with a custom schema
        • Block with a custom schema and edit components
        • Block with a custom schema and variations
        • Block with a custom schema, variations, and a schema enhancer in a variation
    • Integration with the backend
    • Deploying
      • Simple deployment
      • Deployment using a Node.js process manager (PM2)
      • Seamless mode
      • Apache
      • Integration with Sentry
      • critical.css (above the fold) optimizations
    • Upgrade Guide
    • Plone REST API JavaScript client
      • Quick Start
      • Endpoint actions
        • Actions
        • Add-ons
        • Aliases
        • Breadcrumbs
        • Comments
        • Content
        • Context Navigation
        • Control Panels
        • Copy and Move
        • Database
        • Email Notification
        • Email Send
        • Groups
        • History
        • Link Integrity
        • Locking
        • Login
        • Navigation
        • Navigation root
        • Principals
        • Querysources
        • Querystring
        • Querystring Search
        • Registry
        • Relations
        • Roles
        • Rules
        • Search
        • Site
        • Sources
        • System
        • Transactions
        • Translations
        • Types
        • Upgrade
        • Users
        • User schema
        • Vocabularies
        • Workflow
        • Working Copy
      • Miscellaneous considerations
      • Future improvements
    • User Manual
      • Edit content using blocks
      • Copy, Cut, and Paste blocks in Volto
      • Finding links and references to the current page
    • Learning resources
    • Contributing to Volto
      • Develop Volto core
      • Design principles
      • Style Guide
      • JavaScript language features and browser support
      • Linting
      • Testing
      • Acceptance tests
      • Documentation
      • React
      • Redux
      • Routing
      • Icons
      • Accessibility guidelines
      • Bundle size optimization
      • TypeScript
      • Volto core add-ons
      • Version policy
    • Volto Release Notes
    • Release management notes
    • Conceptual guides
      • Volto add-on concepts
  • Classic UI
    • Cross-site request forgery (CSRF)
    • Forms
    • Icons
    • Image handling
    • Layers
    • Module Federation in Mockup
    • Mockup and Patternslib
    • Portlets
    • Recipes
    • Static resources
    • Template global variables
    • Templates
    • Theming Classic UI
      • Change theme settings TTW
      • Create a theme add-on
      • Color modes
      • Classic UI theming with Diazo
      • Theme structure
      • CSS custom properties
    • TinyMCE customization
    • Viewlets
    • Views
    • What's new in Plone 6 Classic UI
  • REST API
    • Introduction
    • Usage
      • Authentication
      • Batching
      • Content Manipulation
      • Customizing the API
      • Expansion
      • Explore the API using Postman
      • i18n: internationalization of screen messages
      • Serialization
      • Types Schema
      • Volto Blocks support
    • Endpoints
      • Add-ons
      • Aliases
      • Breadcrumbs
      • Comments
      • Content Types
      • Content Rules
      • Context Navigation
      • Control Panels
      • Copy and Move
      • Database
      • Email Notification
      • Email Send
      • Groups
      • History
      • Inherit behaviors
      • Link Integrity
      • Locking
      • Login for external authentication links
      • Navigation
      • Navigation root
      • Portal Actions
      • Portraits
      • Principals
      • Querystring
      • Querystring Search
      • Registry
      • Relations
      • Roles
      • Search
      • Sharing
      • Site
      • System
      • Transactions
      • Translations
      • TUS resumable upload
      • Types
      • Upgrade
      • Users
      • User schema
      • Vocabularies and Sources
      • Workflow
      • Working Copy
    • Upgrade Guide
    • Contribute to plone.restapi
      • Conventions
  • Backend
    • Annotations
    • Behaviors
    • Configuration Registry
    • Content Types
      • Creating content types
      • Factory Type Information (FTI)
    • Control panels
    • Fields
    • Global utilities and helpers
    • Indexing
    • Plone Upgrade Guide
      • Introduction
      • Preparations
      • Upgrade add-on products
      • Troubleshooting an upgrade
      • Version-specific migration procedures and tips
        • Upgrading Plone 4.x to 5.0
        • Upgrade a custom add-on to Plone 5.0
        • Upgrading Plone 5 within 5.x.x series
        • Upgrading Plone 5.0 to 5.1
        • Upgrade a custom add-on to Plone 5.1
        • Upgrading Plone 5.1 to 5.2
        • Migrating Plone 5.2 to Python 3
        • Migrate a ZODB from Python 2.7 to Python 3
        • Upgrading Plone 5.2 to 6.0
        • Upgrade Plone 6.0 to 6.1
        • Migrating from Plone Classic UI to Volto
    • plone.api
      • About
      • Add-ons
      • Content
      • Environment
      • Groups
      • Portal
      • Relations
      • Users
      • API methods and descriptions
        • plone.api.addon
        • plone.api.content
        • plone.api.env
        • plone.api.exc
        • plone.api.group
        • plone.api.portal
        • plone.api.relation
        • plone.api.user
      • Contribute to plone.api
    • Portal Actions
    • Relations
    • Schemas
    • Search
    • Security
    • Sending Email
    • Subscribers (event handlers)
    • Traversal and Acquisition
    • Users and Groups
    • Vocabularies
    • Widgets
    • Workflows
    • Zope Object Database (ZODB)
  • Internationalization and Localization
    • Translating text strings
    • Language negotiation in Classic UI
    • Language negotiation in Volto
    • Translating content
    • Contributing Plone Core Translations
    • Resync translations
    • Use an external translation service to translate content
  • Conceptual guides
    • Choose a user interface
    • Compare Buildout and pip
    • Plone distributions
    • Package management
    • Architecture: packages and dependencies
    • make build-backend details
    • Component architecture
  • Contributing to Plone
    • First-time contributors
    • Contribute to documentation
      • Set up, build, and check the quality of documentation
      • Authors guide
      • MyST reference
      • Themes and extensions
      • Administrators guide
    • Contribute to Plone 6 core
      • Write documentation
      • Continuous integration
      • mr.developer
      • Plone Improvement Proposals (PLIPs)
      • PLIP review
      • Plone release process
    • Contributing to plone.api
    • Contributing to plone.restapi
    • Contributing to Volto
    • GitHub administration
  • Reference guide
    • Cookieplone make commands
    • Volto configuration settings
    • Plone REST API JavaScript client endpoints
    • Plone REST API usage
    • Plone REST API endpoints
    • Plone API methods
  • User guide
    • Editor guide

Appendices

  • Glossary
  • Index

Tutorials

  • Plone Training
  • Repository
  • Open issue
  • .md

Querystring Search

Contents

  • Parameters
    • Batch Start (b_start)
    • Batch Size (b_size)
    • Sort on
    • Sort Order
    • Limit
    • Query
      • Metadata Filters
        • Creator
        • Shortname
        • Location
        • Type
        • Review State
        • Show Inactive
      • Text Filters
        • Description
        • Searchable Text
        • Tag
        • Title
      • Date Filters
        • Creation Date
        • Effective Date
        • Event end date
        • Event start date
        • Expiration date
        • Modification date

Querystring Search#

The @querystring-search endpoint returns search results that can be filtered on search criteria.

Call the /@querystring-search endpoint with either a POST or GET request.

When using the POST request, provide a query in the request body:

http

POST /plone/@querystring-search HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
Content-Type: application/json

{
    "query": [
        {
            "i": "portal_type",
            "o": "plone.app.querystring.operation.selection.any",
            "v": [
                "Document"
            ]
        }
    ]
}

curl

curl -i -X POST http://nohost/plone/@querystring-search -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"query": [{"i": "portal_type", "o": "plone.app.querystring.operation.selection.any", "v": ["Document"]}]}' --user admin:secret

httpie

echo '{
  "query": [
    {
      "i": "portal_type",
      "o": "plone.app.querystring.operation.selection.any",
      "v": [
        "Document"
      ]
    }
  ]
}' | http POST http://nohost/plone/@querystring-search Accept:application/json Content-Type:application/json -a admin:secret

python-requests

requests.post('http://nohost/plone/@querystring-search', headers={'Accept': 'application/json', 'Content-Type': 'application/json'}, json={'query': [{'i': 'portal_type', 'o': 'plone.app.querystring.operation.selection.any', 'v': ['Document']}]}, auth=('admin', 'secret'))

The server will respond with the results that are filtered based on the query you provided:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@id": "http://localhost:55001/plone/@querystring-search",
    "items": [
        {
            "@id": "http://localhost:55001/plone/front-page",
            "@type": "Document",
            "description": "Congratulations! You have successfully installed Plone.",
            "review_state": "private",
            "title": "Welcome to Plone",
            "type_title": "Page"
        },
        {
            "@id": "http://localhost:55001/plone/testdocument",
            "@type": "Document",
            "description": "",
            "review_state": "private",
            "title": "Test Document",
            "type_title": "Page"
        }
    ],
    "items_total": 2
}

When using the GET request, provide the query as a JSON URL-encoded string as a parameter.

http

GET /plone/@querystring-search?query=%257B%2522query%2522%253A%255B%257B%2522i%2522%253A%2522portal_type%2522%252C%2522o%2522%253A%2520%2522plone.app.querystring.operation.selection.any%2522%252C%2522v%2522%253A%255B%2522Document%2522%255D%257D%255D%257D HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET 'http://nohost/plone/@querystring-search?query=%257B%2522query%2522%253A%255B%257B%2522i%2522%253A%2522portal_type%2522%252C%2522o%2522%253A%2520%2522plone.app.querystring.operation.selection.any%2522%252C%2522v%2522%253A%255B%2522Document%2522%255D%257D%255D%257D' -H "Accept: application/json" --user admin:secret

httpie

http 'http://nohost/plone/@querystring-search?query=%257B%2522query%2522%253A%255B%257B%2522i%2522%253A%2522portal_type%2522%252C%2522o%2522%253A%2520%2522plone.app.querystring.operation.selection.any%2522%252C%2522v%2522%253A%255B%2522Document%2522%255D%257D%255D%257D' Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/@querystring-search?query=%257B%2522query%2522%253A%255B%257B%2522i%2522%253A%2522portal_type%2522%252C%2522o%2522%253A%2520%2522plone.app.querystring.operation.selection.any%2522%252C%2522v%2522%253A%255B%2522Document%2522%255D%257D%255D%257D', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The server will respond with the results that are filtered based on the query you provided:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@id": "http://localhost:55001/plone/@querystring-search?query=%257B%2522query%2522%253A%255B%257B%2522i%2522%253A%2522portal_type%2522%252C%2522o%2522%253A%2520%2522plone.app.querystring.operation.selection.any%2522%252C%2522v%2522%253A%255B%2522Document%2522%255D%257D%255D%257D",
    "items": [
        {
            "@id": "http://localhost:55001/plone/front-page",
            "@type": "Document",
            "description": "Congratulations! You have successfully installed Plone.",
            "review_state": "private",
            "title": "Welcome to Plone",
            "type_title": "Page"
        },
        {
            "@id": "http://localhost:55001/plone/testdocument",
            "@type": "Document",
            "description": "",
            "review_state": "private",
            "title": "Test Document",
            "type_title": "Page"
        }
    ],
    "items_total": 2
}

Parameters the endpoint will accept:

  • query - plone.app.querystring query, required

  • b_start - integer, batch start

  • b_size - integer, batch size

  • sort_on - string, field that results will be sorted on

  • sort_order - string, value must be either ascending or descending

  • limit - integer, limits the number of returned results

  • fullobjects - boolean, if true then return the full objects instead of just the summary serialization

Parameters#

Batch Start (b_start)#

The b_start parameter defines the first item of the batch:

{
  "b_start": "5",
  "query": [
    {
      'i': 'Title',
      'o': 'plone.app.querystring.operation.string.is',
      'v': 'Welcome to Plone',
    }
  ]
}

The b_size parameter is optional. The default value is 0.

Batch Size (b_size)#

The b_size parameter defines the number of elements a single batch returns:

{
  "b_size": "5",
  "query": [
    {
      'i': 'Title',
      'o': 'plone.app.querystring.operation.string.is',
      'v': 'Welcome to Plone',
    }
  ]
}

The parameter is optional. The default value is 25.

Sort on#

The sort_on parameter defines the field that is used to sort the returned search results:

{
  "sort_on": "sortable_title",
  "query": [
    {
      'i': 'Title',
      'o': 'plone.app.querystring.operation.string.is',
      'v': 'Welcome to Plone',
    }
  ]
}

The sort_on parameter is optional. The default value is None.

Sort Order#

The sort_order parameter defines the sort order when the sort_on field has been set:

{
  "sort_on": "sortable_title",
  "sort_order": "reverse",
  "query": [
    {
      'i': 'Title',
      'o': 'plone.app.querystring.operation.string.is',
      'v': 'Welcome to Plone',
    }
  ]
}

The sort_order parameter is optional. The default value is ascending.

The sort_order can be either ascending or descending. ascending means from A to Z for a text field. reverse is an alias equivalent to descending.

Limit#

Querystring query with a limit parameter:

{
  "limit": "10",
  "query": [
    {
      'i': 'Title',
      'o': 'plone.app.querystring.operation.string.is',
      'v': 'Welcome to Plone',
    }
  ]
}

The limit parameter is optional. The default value is 1000.

Query#

The query parameter is a list that contains an arbitrary number of filters:

{
  "query": [
    {
      'i': 'Title',
      'o': 'plone.app.querystring.operation.string.is',
      'v': 'Welcome to Plone',
    }
  ]
}

A filter always contains three values:

  • ì: The index of the filter (the name of the field to which this filter is applied).

  • o: The operator of the filter. A full list can be found at plone/plone.app.querystring.

  • v: The value of the filter. This depends highly on the index. For a text index, this is a string. For a date index, this might be a date range.

The following types of filters are available:

  • Metadata filters

  • Date filters

  • Text Filters

Metadata Filters#

Creator#

The creator of the content object.

You can either set the currently logged in user:

{
  "query":[
    {
      "i":"Creator",
      "o":"plone.app.querystring.operation.string.currentUser",
      "v":""
    }
  ],
}

…or set a username:

{
  "query":[
    {
      "i":"Creator",
      "o":"plone.app.querystring.operation.selection.any",
      "v":["noam"]
    }
  ]
}
Shortname#

Shortname is the ID of the object that is shown as the last part of the URL:

{
  "query":[
    {
      "i":"getId",
      "o":"plone.app.querystring.operation.string.is",
      "v":"hero"
    }
  ]
}
Location#

Location is the path of the content object on the site. You can either set three kind of paths.

The absolute path from the portal root:

{
  "query":[
    {
      "i":"path",
      "o":"plone.app.querystring.operation.string.absolutePath",
      "v":"/my-content-object"
    }
  ]
}

The relative path from the current object:

{
  "query":[
    {
      "i":"path",
      "o":"plone.app.querystring.operation.string.relativePath",
      "v":"../my-content-object"
    }
  ]
}

The navigation path:

{
  "query":[
    {
      "i":"path",
      "o":"plone.app.querystring.operation.string.path",
      "v":"/hero"
    }
  ]
}

The computed path can be stored:

{
  "query": [
    {
      'i': 'path',
      'o': 'plone.app.querystring.operation.string.path',
      'v': '00000000000000001',
    }
  ]
}

The path can contain a depth parameter that is separated with :::

{
  "query": [
    {
      'i': 'path',
      'o': 'plone.app.querystring.operation.string.path',
      'v': '/my-content-object::2',
    }
  ]
}
Type#

Filter by portal type:

{
  "query": [
    {
      "i": "portal_type",
      "o": "plone.app.querystring.operation.selection.any",
      "v": ["Document"],
    }
  ]
}
Review State#

Filter results by review state:

{
  "query":[
    {
      "i":"review_state",
      "o":"plone.app.querystring.operation.selection.any",
      "v":["published"]
    }
  ]
}
Show Inactive#

Show inactive will return content objects that is expired for a given role:

{
  "query":[
    {
      "i":"show_inactive",
      "o":"plone.app.querystring.operation.string.showInactive",
      "v":["Owner"]
    }
  ]
}

Text Filters#

Description#

Filter content that contains a term in the Description field:

{
  "query":[
    {
      "i":"Description",
      "o":"plone.app.querystring.operation.string.contains",
      "v":"Noam"
    }
  ]
}
Searchable Text#

Filter content that contains a term in the SearchableText (all searchable fields in the catalog):

{
  "query":[
    {
      "i":"SearchableText",
      "o":"plone.app.querystring.operation.string.contains",
      "v":"Noam"
    }
  ]
}
Tag#

Filter by a tag (subjects field):

{
  "query":[
    {
      "i":"Subject",
      "o":"plone.app.querystring.operation.selection.any",
      "v":["Astrophysics"]
    }
  ]
}
Title#

Filter by exact Title match:

"query": [
  {
    'i': 'Title',
    'o': 'plone.app.querystring.operation.string.is',
    'v': 'Welcome to Plone',
  }
]

Date Filters#

Creation Date#

Filter by creation date:

{
  "query":[
    {
      "i": "created",
      "o": "plone.app.querystring.operation.date.lessThan",
      "v": "2021-11-11"
    }
  ]
}
Effective Date#

Filter by effective date:

{
  "query":[
    {
      "i": "effective",
      "o": "plone.app.querystring.operation.date.largerThan",
      "v": "2021-11-11"
      }
    }
  ]
}
Event end date#

Filter by event end date:

{
  "query":[
    {
      "i": "end",
      "o": "plone.app.querystring.operation.date.lessThan",
      "v":"2021-11-04"
    }
  ]
}
Event start date#

Filter by event start date:

{
  "query":[
    {
      "i": "end",
      "o": "plone.app.querystring.operation.date.lessThan",
      "v":"2021-11-04"
    }
  ]
}
Expiration date#

Filter by expiration date:

{
  "query":[
    {
      "i": "expires",
      "o": "plone.app.querystring.operation.date.largerThan",
      "v": "2021-11-11"
      }
    }
  ]
}
Modification date#

Filter by modification date:

{
  "query":[
    {
      "i": "modified",
      "o": "plone.app.querystring.operation.date.largerThan",
      "v": "2021-11-11"
      }
    }
  ]
}

previous

Querystring

next

Registry

Contents
  • Parameters
    • Batch Start (b_start)
    • Batch Size (b_size)
    • Sort on
    • Sort Order
    • Limit
    • Query
      • Metadata Filters
        • Creator
        • Shortname
        • Location
        • Type
        • Review State
        • Show Inactive
      • Text Filters
        • Description
        • Searchable Text
        • Tag
        • Title
      • Date Filters
        • Creation Date
        • Effective Date
        • Event end date
        • Event start date
        • Expiration date
        • Modification date

By Plone community

© Copyright Plone Foundation.

The text and illustrations in this website are licensed by the Plone Foundation under a Creative Commons Attribution 4.0 International license. Plone and the Plone® logo are registered trademarks of the Plone Foundation, registered in the United States and other countries. For guidelines on the permitted uses of the Plone trademarks, see https://plone.org/foundation/logo. All other trademarks are owned by their respective owners.

Pull request previews by Read the Docs.

  • GitHub
  • Mastodon
  • YouTube
  • X (formerly Twitter)