Is there any search parameters reference?

Author: jasonbiglCreated Mar 28, 2024Updated Sep 24, 2024

Hi, I'm looking for the replacement for mysql like %abc% query and zincsearch seems to be a good solution, however I have faced two problem and didn't find any related document, can you please help?

  1. I see the sample search payload in document is:
json
{
    "search_type": "match",
    "query": {
        "term": "shell window",
        "field": "_all",
        "start_time": "2021-12-25T15:08:48.777Z",
        "end_time": "2021-12-28T16:08:48.777Z"
    },
    "sort_fields": ["-@timestamp"],
    "from": 0,
    "max_results": 20,
    "_source": [
        "Field1", "Field2" // Leave this as empty array to return all fields.
    ]
}

is there any detailed reference about all supported parameters? for example, what expressions are supported in query.term object?

  1. how can I search like mysql like query? I have create a document via:
json
{ 
    "id": 123,
    "name": "Prabhat Sharma is meeting friends in San Francisco" 
}

I tried to search via

json
{
    "search_type": "match",
    "query": {
        "term": "friend",
        "field": "_all"
    }
}

it return empty, search by term friends is working as expected