Elasticsearch works slow on Azure

Hi i have deployed elasticsearch on Azure VM with 28GB RAM size. My database size is 100GB .
A query which returns 30K result takes more than 3 minutes.

many thanks

what type of query are you running? What type of data are you querying? How many indices and shards are the query targeting?

MY Query looks like this,

    "query": {
    "multi_match" : {
    	"query":    "honda bike", 
    	"type":       "cross_fields",
    	"operator":   "and",
    	"analyzer":"my_synonyms"
    }

I have reviews in my database, with above query i am trying to find all the reviews where honda and bike both are present.
Total indices 1 and 30 shards.

Which version of Elasticsearch are you using? What type of storage do you have? What does disk I/O and iowait look like while the query is executing?

6.2.3 elasticsearch version. SSD storage

Tasks: 159 total,   1 running, 158 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni, 99.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 32919076 total,   259524 free, 23101600 used,  9557952 buff/cache
KiB Swap:        0 total,        0 free,        0 used.  9219840 avail Mem

Is that the full query you are running?

Yes this is my complete query.

"query": {
"multi_match" : {
	"query":    "honda bike", 
	"type":       "cross_fields",
	"operator":   "and",
	"analyzer":"my_synonyms"
}

Can you please show us the full request you are sending?

GET _search
{
   "query": {
"multi_match" : {
	"query":    "honda bike", 
	"type":       "cross_fields",
	"operator":   "and",
	"analyzer":"my_synonyms"
}

That is not valid JSON as there are curly braces missing. Is there anything else that has been left out? Are you specifying size anywhere?

How is the my_synonyms analyser defined?

PUT /test/_settings
{
    "analysis": {
      "filter": {
        "my_synonym_filter": {
          "type": "synonym",
          "synonyms_path": "synonym.txt"
        }
      },
      "analyzer": {
        "my_synonyms": {
          "tokenizer": "whitespace",
          "filter": [
            "lowercase",
            "my_synonym_filter"
          ]
        }
      }
    }
  }

Size is defined 50000

How large is the synonyms file?

It has almost 5k lines

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