Search API requests returns Error 500 Internal Server Error: An internal server error occurred

Hi I have a problem with Enterprise search. I have loaded the index and want to test the search through Search UI. And generally it works fine, but sometimes the error "Internal server error. Please check your application server logs for more details and contact Elastic support if the problem persists." pops up.
I noticed in Api Logs that this happens when the query is empty

Of course, I do not make empty inquiries. It's just that after some time of inactivity on the site it throws me this error.

"{
  "query": "",
  "result_fields": {
    "block.date": {
      "raw": {},
      "snippet": {
        "size": 100,
        "fallback": true
      }
    },
"

What could be the problem? With other indexes this problem does not exist, but this index has more than 100 million documents, others only 5.

hiya

Which connector are you using? The elasticsearch-connector or app-search-connector? I presume the app-search-connector in this example as you are using enterprise search.

Its fine to be performing empty queries, it should return back all the results.

is the response a 5xx from the API?

It could be down to a particular result thats causing issues with serialising. One way to diagnose is to copy the request and repeat it in postman but adjusting the size and from parameters to bring back a single result to see if you get a 200 or 500 back. Also adjusting the result fields too.

Joe

Yes im using app-search-connector.

The response from api is 500

Do you get the same error in kibana when you browse to documents, do you see the same error? (fails to render)

No, when I use the discover option in kibana to preview the index I get no errors.

this section located on url /app/enterprise_search/app_search/engines/<engine_name>/documents?

Theres another area in kibana called discover which is querying elasticsearch indices directly which i dont expect to break.

In postman when i

{
  "query": "",
  "result_fields": {
    "block.date": {
      "raw": {},
      "snippet": {
        "size": 21,
        "fallback": true
      }
    },

In postman, when it executes POST with empty query and size is set to 100 it gets error. On the other hand, when I change the size to 21 I get a response.

When the query is not empty ( i mean query": "blabla") then with size 100 it works.

Ok thanks!

actually what is contained in date? Snippet provides highlighting on matches in date. Do you need highlighting here?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.