Skip to content

Search Operators

Treechat supports Google-style search syntax with powerful operators to filter and refine your search results.

Quick Reference (TLDR)

Most commonly used operators:

  • from:username - Filter by user
  • stream:team_name - Filter by channel/team
  • has:video / has:image / has:url - Filter by content type
  • is:public / is:private - Filter by visibility
  • before:2025-10-01 / after:2025-09-01 - Date ranges
  • +"exact phrase" / -"unwanted" - Required/excluded phrases
  • upvote:>10 - Filter by upvote count
  • sort:new / sort:hot / sort:top - Sort results

Example: from:alice has:video sort:hot before:2025-10-01 +blockchain


User Filters

from:username

Filter quests by a specific user (case-insensitive username lookup).

Quote support: Use quotes for usernames with spaces: from:"User Name"

Compound values: Comma-separate usernames to OR them together. The operator always matches the parent author (the quest creator), not participants.

Examples:

  • from:alice - All quests by user “alice”
  • from:alice,bob - Quests where alice OR bob is the parent author
  • from:"John Doe","Jane Smith" - Quests created by either quoted name
  • from:bob bitcoin - Quests by “bob” containing “bitcoin”

Channel/Team Filters

stream:team_name

Filter by one or more teams/channels. Supports comma-separated values and special pseudostreams.

Quote support for names with spaces:

  • stream:"Team With Spaces" - Single team with spaces
  • stream:"Team A","Team B",unquoted - Mixed quoted and unquoted channels

Standard channels:

  • stream:bitcoin - Filter by “bitcoin” channel
  • stream:bitcoin,ethereum - Filter by multiple channels (OR logic)

Pseudostreams:

  • stream:public or stream:home - Public feed pseudostream
  • stream:private - Private feed pseudostream
  • stream:clips or stream:clip - Clips pseudostream

Examples:

  • stream:bitcoin,ethereum artificial intelligence
  • stream:"Bitcoin Discussion",ethereum,"DeFi Projects"
  • stream:public has:video
  • stream:clips from:alice

Error handling: Returns error if channel name is not found or is ambiguous (multiple channels with same name in different spaces).


Date Filters

before:YYYY-MM-DD

Filter quests created before the specified date.

Example: before:2025-10-01 - Quests before October 1, 2025

after:YYYY-MM-DD

Filter quests created after the specified date.

Example: after:2025-09-01 - Quests after September 1, 2025

Date Ranges

Combine both operators for date ranges.

Example: after:2025-09-01 before:2025-10-01 - Quests in September 2025

Error handling: Returns error for invalid date formats (e.g., before:2025-13-45).


Content Type Filters

has:video

Filter quests that have video attachments.

Example: has:video machine learning

has:image

Filter quests that have image attachments.

Example: has:image infographic

Filter quests that contain URLs. This includes embedded tweets (tweets always have URLs).

Aliases: has:url and has:link are equivalent

Example: has:url bitcoin - Quests with links about bitcoin

has:tweet

Filter quests that have embedded tweets.

Example: has:tweet elon musk

has:media

Filter quests with any media type (video OR image OR url OR tweet).

This is a shorthand for combining all media filters.

Example: has:media - Any quest with media content


Visibility Filters

is:public

Filter to show only public quests.

Example: is:public has:video

is:private

Filter to show only private quests.

Example: is:private has:image

is:clip

Filter to show only clip quests.

Example: is:clip from:alice


Numeric Comparison Filters

upvote:[operator]value

Filter by upvote count with comparison operators.

Supported operators:

  • upvote:10 or upvote:=10 - Exactly 10 upvotes
  • upvote:>10 - More than 10 upvotes
  • upvote:>=10 - 10 or more upvotes
  • upvote:<10 - Less than 10 upvotes
  • upvote:<=10 - 10 or fewer upvotes

Examples:

  • upvote:>=10 has:url - Highly upvoted quests with URLs
  • upvote:>100 bitcoin - Popular bitcoin-related quests

Error handling: Returns error for negative values or invalid numeric formats.

upvalue:[operator]value

Filter by BSV upvalue amount in satoshis. Uses the same comparison operators as upvote.

Supported operators: Same as upvote (=, >, >=, <, <=)

Examples:

  • upvalue:>=1000 - Quests with 1000+ satoshis in upvalue
  • upvalue:>5000 technology - High-value technology quests

Error handling: Returns error for negative values or invalid numeric formats.


Sort Operators

sort:new

Sort results chronologically (newest first).

Aliases: sort:time, sort:recency

Example: sort:new bitcoin

sort:relevance

Sort by text relevance with engagement signals.

Aliases: sort:relev

Example: sort:relevance artificial intelligence

sort:hot

Sort using trending algorithm (time-decayed engagement).

Aliases: sort:trending

Example: sort:hot cryptocurrency

sort:top

Sort by most upvoted (uses BSV value if channel supports it).

Aliases: sort:upvote, sort:upvalue

Example: sort:top has:video

Note: If multiple sort operators are present, the last one wins.


Operator Logic

Compound Search Logic

Within an operator (OR logic):

  • stream:A,B,C - Returns quests from A OR B OR C
  • from:alice,bob - Returns quests where alice OR bob is the parent author
  • Multiple channels use OR logic: stream:A,B returns quests from channel A OR channel B

Between operators (AND logic):

  • stream:A from:user - Returns quests in A AND by user
  • Multiple operators use AND logic: stream:A from:user returns quests in A AND by user

Example:

  • stream:bitcoin,ethereum from:alice
  • Returns: Quests by alice in (bitcoin OR ethereum)
  • Logic: (channel=bitcoin OR channel=ethereum) AND from=alice

Required/Excluded Content

+“exact phrase”

Require an exact phrase to be present in the quest.

Google behavior: Quoted phrases are always MUST requirements unless prefixed with -.

Examples:

  • +"nakamoto consensus" - Must contain this exact phrase
  • +"climate change" policy - Must have exact phrase, plus “policy” in any form

-”unwanted phrase”

Exclude quests containing this exact phrase.

Example: bitcoin -"price prediction" - Bitcoin content without price predictions

+requiredword

Require a specific word to be present (unquoted).

Example: +bitcoin +blockchain technology

-excludedword

Exclude quests containing a specific word (unquoted).

Example: cryptocurrency -scam -fraud

Note: You can combine multiple required and excluded terms:

Example: stream:bitcoin,ethereum +"nakamoto consensus" -scam +decentralization


Complex Quote and Compound Usage

Mixed quoted and unquoted channels:

stream:"Bitcoin Discussion",ethereum,"DeFi Projects"

Searches three teams: “Bitcoin Discussion” (quoted), “ethereum” (unquoted), and “DeFi Projects” (quoted).

stream:"Team A","Team B",unquoted from:"User Name" has:video sort:hot

Finds videos from user “User Name” in any of the three teams, sorted by trending.

Quote handling rules:

  • Use quotes when names contain spaces
  • Mix quoted and unquoted values in comma-separated lists
  • Quotes are optional for single-word names

Complete Examples

Example 1: User content with filters

from:alice has:video before:2025-10-01

Finds all video quests by alice created before October 1, 2025.

Example 2: Multi-channel search with requirements

stream:bitcoin,ethereum +"nakamoto consensus" -scam

Searches Bitcoin or Ethereum channels for content with exact phrase “nakamoto consensus”, excluding anything with “scam”.

Example 3: Public video content

is:public has:video sort:hot

Shows trending public quests with videos.

Example 4: Date range with popularity filter

upvote:>=10 has:url after:2025-09-01 sort:top artificial intelligence

Shows highly upvoted quests with URLs about AI from September 2025 onwards, sorted by upvotes.

Example 5: Private images

is:private has:image from:bob

Shows private image quests from user bob.

Example 6: Complex search with multiple operators

stream:technology upvote:>50 has:video +"machine learning" -hype after:2025-01-01 sort:relevance

Searches the technology channel for highly upvoted video quests with exact phrase “machine learning”, excluding “hype”, from 2025 onwards, sorted by relevance.


Parsing Behavior

Filter Extraction

All operators are extracted from the query string. The remaining text becomes a free-form search query.

Example: from:alice bitcoin mining → User filter: alice, Free-form query: “bitcoin mining”

Case Sensitivity

  • User lookups: Case-insensitive
  • Team/channel lookups: Case-insensitive
  • Filter keywords: Case-insensitive
  • Free-form search text: Preserves original case (analyzed by Elasticsearch)

Caching

User and team lookups are cached per request for performance.

Ambiguity Resolution

Channel names require space_id for disambiguation since multiple spaces may have channels with the same name. Ambiguous channel names return an error.


Error Handling

The parser returns HTTP 400 errors for:

  • User not found: from:nonexistent_user
  • Channel not found: stream:invalid_name
  • Ambiguous channel: stream:name (when multiple matches exist)
  • Invalid date format: before:2025-13-45
  • Invalid numeric value: upvote:notanumber
  • Negative numeric values: upvote:-5

All errors are returned to the client with descriptive error messages.