Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any search parameters reference? #955

Open
jasonbigl opened this issue Mar 28, 2024 · 2 comments
Open

Is there any search parameters reference? #955

jasonbigl opened this issue Mar 28, 2024 · 2 comments

Comments

@jasonbigl
Copy link

jasonbigl commented Mar 28, 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:
{
    "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:
{ 
    "id": 123,
    "name": "Prabhat Sharma is meeting friends in San Francisco" 
}

I tried to search via

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

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

@KaniuBillows
Copy link
Contributor

I think you are looking for Wildcard Query, maybe this can help you:
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html

@hengfeiyang
Copy link
Contributor

@jasonbigl Yes, we are using the ElasticSearch query DSL for search: https://zincsearch-docs.zinc.dev/api-es-compatible/search/search/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants