After indexing 50M documents, I am experiencing really slow search response. And when I query with some facet fields I get internal server error after waiting for 30+ seconds.
I increased the memory allocated to appsearch and enterprise search:
Following are the memory settings of Elasticsearch and enterprise search respectively:
ES_JAVA_OPTS=-Xms30g -Xmx30g
JAVA_OPTS=-Xms30g -Xmx30g
Other thing I tried was to make only some fields searchable from the appsearch dashboard (localhost:3002) that didn't work either.
http://localhost:3002/api/as/v1/engines/propertyeng/search
Request:
{
"query": "",
"facets": {
"property_type": {
"type": "value",
"size": 100
},
"score": {
"type": "value",
"size": 100
},
"year_built": {
"type": "value"
},
"beds": {
"type": "value"
},
"bath": {
"type": "value"
},
"units_count": {
"type": "value"
},
"sale_price": {
"type": "value"
},
"sale_value": {
"type": "value"
},
"valuation_value": {
"type": "value"
},
"est_equity": {
"type": "value"
},
"loan_amount": {
"type": "value"
},
"loan_type": {
"type": "value"
},
"land_value": {
"type": "value"
},
"open_mortgages": {
"type": "value"
},
"owner_city": {
"type": "value"
},
"est_ownership_length": {
"type": "value"
},
"seller_state": {
"type": "value"
},
"section_township_range": {
"type": "value"
},
"sale_date": {
"type": "value"
},
"conditions": {
"type": "value"
},
"roof_material_type": {
"type": "value"
},
"amenities": {
"type": "value"
},
"sqft_land": {
"type": "value"
},
"total_mortgage_balance": {
"type": "value"
},
"sqft_building": {
"type": "value"
},
"liens": {
"type": "value"
},
"bankruptcy": {
"type": "value"
},
"preforeclosure": {
"type": "value"
},
"absentee": {
"type": "value"
},
"judgement": {
"type": "value"
},
"vacant": {
"type": "value"
},
"inherited": {
"type": "value"
}
},
"page": {
"size": 20,
"current": 1
}
}
Response:
{
"errors": [
"Internal server error. Please check your application server logs for more details and contact Elastic support if the problem persists"
]
}