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

Search API - when to use keyword, order by issue #158

Closed
trzcina opened this issue Jun 16, 2023 · 1 comment
Closed

Search API - when to use keyword, order by issue #158

trzcina opened this issue Jun 16, 2023 · 1 comment

Comments

@trzcina
Copy link
Member

trzcina commented Jun 16, 2023

Search API is based on ElasticSearch, but ES knowledge should not be necessary to use standard search functions.

Search docs: https://flotiq.com/docs/API/search/

Example request with order_by, according to docs:

  1. Search all [works] https://api.flotiq.com/api/v1/search?q=*&auth_token=__TOKEN__
  2. Search all ordered by created [error]: https://api.flotiq.com/api/v1/search?q=*&order_by=created&auth_token=__TOKEN__

Search all ordered by causes error:

        "q": [
            "Malformed query"
        ]
    }

We should use created.keyword (notice "keyword", that is not mentioned in docs)
https://api.flotiq.com/api/v1/search?q=*&order_by=created.keyword&auth_token=__TOKEN__
And it works fine.

Please add info on when should I use .keyword or refer to ES docs

@CiotkaCierpienia
Copy link
Member

Resolved with #262

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

2 participants