Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

searchPosition: 123// can be empty; Position where a search should start in the memory, see below

numResults: 1,

msSearchAfterNumResults: 100 //number of milliseconds the search will continue, after the first result is found. All additional results that are found in this additional time will also be returned until numResults is reached. If numResults is reached before msSearchAfterNumResults is reached, the search will abort. If msSearchAfterNumResults is reached before numResults is reached, search is also aborted. All found results are delivered in both cases.

...

NewSearchPosition: '123:54', /returns NULL, if end of TM is reached, see below

results:[{

source: „Das ist das Haus des Nikolaus“,

...

  • 400 Bad Request – if search, query or language parameters are missing or are not well formed.
  • 404 Not Found – if TM file to given [TM_Name] in URL was not found
  • 500 Server Error – for other technical problems.

SearchPosition / NewSearchPosition

The NextSearchposition is an internal key of the memory for the next position on sequential access. Since it is an internal key, maintained and understanded by the underlying memory plug-in (for EqfMemoryPlugin is it the record number and the position in one record),
no assumptions should be made regarding the content. It is just a string which, should be send back to OpenTM2 on the next request, so that the search starts from there.
So is the implementation in Translate5: The first request to OpenTM2 contains SearchPosition with an empty string, OpenTM2 returns then a string in NewSearchPosition, which is just resend to OpenTM2 in the next request.