Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion src/codeocean/capsule.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,38 @@ class CapsuleSearchParams:
query: Optional[str] = dataclass_field(
default=None,
metadata={
"description": "Search query in free text or structured format (name:... tag:...)"
"description": """Search expression supporting free text and field:value filters.
Valid fields:
- id
- name
- doi
- tag
- field
- affiliation
- journal
- article
- author

Free text:
- Matches across weighted fields (name, tags, description, authors, etc.)

Syntax rules:
- Same field repeated = OR
- Different fields = AND
- Quotes = exact phrase
- No explicit OR operator
- No wildcards (*)
- Not case sensitive

Notes:
- "description" is not directly searchable; it is covered by free-text matching.

Examples:
- name:RNA-seq tag:genomics
- name:"single cell analysis"
- Synergy
- name:Synergy
"""
},
)
next_token: Optional[str] = dataclass_field(
Expand Down
26 changes: 24 additions & 2 deletions src/codeocean/data_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,30 @@ class DataAssetSearchParams:
query: Optional[str] = field(
default=None,
metadata={
"description": "Search query in free text or structured format "
"(name:... tag:... run_script:... commit_id:...)",
"description": """Search expression supporting free text and field:value filters.
Valid fields:
- name
- tag
- run_script
- commit_id
- contained_data_id

Free text:
- Matches across weighted fields (name, tags, description, custom metadata)

Syntax rules:
- Same field repeated = OR
- Different fields = AND
- Quotes = exact phrase
- No explicit OR operator
- No wildcards (*)
- Not case sensitive

Examples:
- name:RNA-seq tag:genomics
- name:"analysis pipeline"
- name:Synergy
"""
},
)
next_token: Optional[str] = field(
Expand Down