How to formulate JSON matches with multiple match_phrases?

Hi,
I’m new to manticoresearch. I first tried the mysql interface and want to write my query now in python using the json query syntax. I have some questions which are not answered by the documentation.

I have the following query in mysql syntax:
select snippet(words, query()) as suggestion from de_dict where MATCH(’"^aber noch keine Antwort"|"^noch keine Antwort"|"^keine Antwort"|"^Antwort"’) option ranker=expr(‘1000*doc_word_count+count’);

  1. Question:
    How can I add multiple match_phrases, each starting at the beginning of the same field to one json query?
  2. Question:
    How can I set the ranker in json syntax?
  3. Question:
    I need to know, which of my phrase matches matched in each result, in mysql syntax, i could use “snippet(words, query())”, what is the equivalent in json syntax?

Thank you for your help!
Alex

Well you could just send the SQL query to the /sql endpoint, and get the reply in JSON format using the HTTP API.
Dont ‘need’ to use the ‘search’ endpoint.

  1. If want to use the ‘full’ json API, just use query_string
    Manticore Search Manual: Searching > Full text matching > Basic usage
    that accepts the full/extended query as MATCH(…)

  2. to be honest dont think, you can. the HTTP API is kinda designed to mimick the interface from ElasticSerach and as such dont implements the compatible functions

  3. the API does have a relatively high level concept of ‘highlighting’ which is basically snippets.
    Manticore Search Manual: Searching > Highlighting