Wildcard search
Translation Memory
Wildcard search
Overview
- Searches a single translation memory via Elasticsearch wildcard queries and returns up to
countmatches.
Query semantics
querysupports*(multi-character, single-token) and?(single-character) wildcards. Queries map directly to ESquery_string, so ordering is flexible and Boolean operators from user input are ignored.- If
queryis omitted or blank, the service falls back to*, which matches any source segment.
Query examples
Imagine having segment: Good morning
Query:
good morn*→ matchesGood morning.morn* good→ matchesGood morning(word order ignored in contains mode).goof morn*→ also matchesGood morningbecause any matching token is sufficient.*→ matches any TM segment."good morn*"→ treated literally; returns no results unless the segment actually contains the quotes.Good morning(no quotes) → matchesGood morning.
Request limits
countmust be between1and50(default15).offsetmust be ≥0(default0).sourceLangmust be a valid locale;targetLangsis optional (defaults to the TM target locales when omitted).
Scoring and ordering
- Backend returns both
grossScore(raw) andscore(penalty-adjusted, never negative). - Ordering priority:
score DESC,grossScore DESC, TM order ASC, modified or created timestamp DESC, source TUV ID ASC.
Target handling
- Hits without targets in the requested locales are filtered out.
- Multiple requested target locales produce multiple ordered target records per hit.
Validation & errors
- Invalid locales,
count/offsetoutside allowed bounds, or missing TM access rights yield400/403. - Because no total size is returned, clients should consider using
offset + countto detect pagination end (empty page ⇒ done).
POST
Wildcard search
Documentation Index
Fetch the complete documentation index at: https://developers.phrase.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Get a token from auth/login endpoint and then pass it in the Authorization HTTP header in every subsequent API call. For more information visit our help center.
Path Parameters
Body
application/json
Response
successful operation