Skip to content
  • Our Product
    • Namazu Elements
      • What is Elements?
      • Why open source?
      • Docs
        • Elements in Five Minutes or Less
        • RESTful APIs Library
        • Security Model
        • Accessing the Web UI (CMS)

    Our Product

    A logomark with three layered rhombuses adorning the lettermark that says Elements in bold all-caps sans-serif letters.
    • What is Namazu Elements? Discover our easy-to-use backend network solution built for online games. Rapidly enables full-scale multiplayer games or online solo adventures.
    • Why open source? Is there a truly open source server backend for connected games? There is now. Download and run a local copy of Namazu Elements and try it for yourself.
    Download Namazu Elements

    Get started

    • Quick start Read our Elements 5-minute quick start guide
    • Documentation Read our developer docs for learning more about Elements
    • RESTful APIs A full list of core API specs for working with the Elements framework
    • Security An overview of the server-authoritative security model of Elements
    • Accessing the CMS Manage your game with ease via the Namazu Elements CMS.

    Co-development Reimagined

    • Reduce your costs Would you rather outsource your backend development? Hire Namazu Studios to build your server backend with the power of Namazu Elements.
      Co-dev

    Recent Posts

    • The watercolor-styled Namazu Studios logo over a giant namazu lurking in the depth
      Namazu Studios Featured in San Diego Business Journal
      22 Sep 2025 Press
    • Namazu Elements 3.1 Released – Service Layer Fixes, Secure APIs, and Steam Bug Fix
      22 Apr 2025 Release Notes
  • Case Studies
  • About Us
  • News
  • Services
  • Book a call
namazu-studios-logo
Book a call

Getting Started

  • Elements in Five Minutes or Less
  • 🐧Ubuntu Linux Setup
  • 🍎 Mac OS Setup
  • 🖥️ Setup for Windows
  • Accessing the Web UI (CMS)
  • General Concepts
  • N-Tier Architecture
  • Security Model

Namazu Elements Core

  • User Authentication / Sign In
    • What is a User?
    • User Authentication in Elements
    • Auth Schemes
      • Auth Schemes
      • OAuth2
      • OIDC
  • Features
    • Applications
    • Sessions
    • Users and Profiles
    • Digital Goods
    • Progress and Missions
    • Progress and Missions (3.4+)
    • Leaderboards
    • Matchmaking – Comprehensive Guide
    • Followers
    • Friends
    • Reward Issuance
    • Save Data
    • Metadata
    • Metadata (3.4+)
    • Queries
    • Web3
      • Wallets
      • Vaults
      • Omni Chain Support
      • Smart Contracts
        • Smart Contracts
  • Queries
    • Advanced Operators
    • Object Graph Navigation
    • Boolean Queries
    • Base Query Syntax
  • Advanced Operators
    • .name
    • .ref

Custom Code

  • Custom Code Overview
  • Introduction to Guice and Jakarta in Elements
  • Structuring your Element
  • Packaging an Element with Maven
  • Deploying an Element
  • Preparing for Code Generation
  • Properties
  • Websockets
  • RESTful APIs
  • Direct MongoDB Access (3.5+)

Releases

  • 3.4 Release Notes
  • 3.3 Release Notes
  • 3.2 Release Notes
  • 3.1 Release Notes

Configuration

  • Matchmaking – Comprehensive Guide
  • Direct Database Access and Batch Configuration
  • Batch Samples
    • Mission Upload Bash Script Sample
    • Item Upload Bash Script Sample

RESTful APIs

  • RESTful APIs Library
  • Swagger and Swagger UI

Crossplay

  • Namazu Crossfire
  • Deploying Namazu Crossfire in Your Game
View Categories
  • Home
  • Docs
  • Namazu Elements Core
  • Queries
  • Base Query Syntax

Base Query Syntax

Est. read time: 2 min read


Base Query Syntax #

The query system support two major types, Strings and Numbers. When searching for objects, it will be necessary to distinguish between those two types.

Text Queries #

When dealing with text types, the : operator is used for textual equality. The full syntax is as follows:

{property name}:{property value}

This will perform a query which matches objects with the following criteria:

  • property name must exist on the object
  • The value of the object in the database must be a string
  • The value must match exactly property value

If those conditions are not met, then no objects will match.

Additionally, it is possible to encapsulate the property in quotes to ensure that the parser will properly parse the values. For example:

displayName:"Jack Ryan 1984"

Will match exactly the string “Jack Ryan 1984”

Numeric Queries #

Similar text queries, numeric queries exist allowing for complex selection of numeric values. Unlike text queries, Elements supports multiple operators:

  • < – Less Than
  • > – Greater Than
  • <= – Less Than or Equal To
  • >= – Greater Than or Equal To
  • = – Equal to
  • != – Not Equal or Logical Xor
  • : and TO – Range Operator

Numeric queries typically look a little bit different than their string-based counterparts and, with the exception of the range operator, follow the following syntax:

{property name} {numeric operator} {property value}

This will perform a query which matches objects with the following criteria:

  • property name must exist on the object
  • The numeric operator must be a valid operator one of:
  • <, >, <=, >=, =, !=
  • For range queries, see the section #range-query for more information.
  • The value must match property value based on the rules of the operator

For example, it would be possible to find all scores greater than 100 using the following query:

score > 100

Range Query #

The Range Query is a special case designed to reduce the need to define ranges using a combination of boolean operators. Range Queries look similar to String queries, with the important distinction that they are able to operate ranges of numbers. All ranges are inclusive and use the following syntax:

{property name}:{property lower bound} TO {property upper bound}

This will perform a query which matches objects with the following criteria:

  • property name must exist on the object
  • The value of the object in the database must be a number
  • The value must be …
  • Greater than or equal to property lower bound
  • Less than or equal to property upper bound
What are your Feelings
Still stuck? How can we help?

How can we help?

Updated on August 14, 2025
Boolean Queries
Table of Contents
  • Base Query Syntax
  • Text Queries
  • Numeric Queries
    • Range Query
  • Documentation
  • Terms of Service
  • Privacy Policy
  • Contact us
  • Linkedin
  • Join our Discord

Namazu Studios LLC is powered by Namazu Elements, an Elemental Computing Inc. product.

Elements
  • Download
  • About Elements
  • Open source
  • Documentation
  • Support
About Namazu
  • Case Studies
  • About Us
  • News
Get in Touch
  • info@namazustudios.com
  • Book a call
  • (619) 862-2890
  • Linkedin
  • Discord

©2008-2025 Namazu Studios. All Rights Reserved.