ElasticSearch - Different search results for a single index with 5 or 1 shards

I run one node with ElasticSearch (1.4.4), and I have two indexes with the same documents indexed. The only difference is the number of fragments:

  • Index 1: 5 shards, 0 replicas
  • Index 2: 1 Shard, 0 Replicas

When I run a test of 100 different queries using the Java API, I get different results for each index. I tried using DFS Query Then Fetch for both of them, but still get different results.

I wonder what is going on. I'm not sure how elasticsearch executes queries to get different results.

UPDATE:

These are the settings and mappings for my indices:

"settings": { "number_of_shards" : 1, // or 5 for the other index "number_of_replicas" : 0, "analysis": { "filter": { "worddelimiter": { "type": "word_delimiter" } }, "analyzer": { "custom_analyzer": { "type": "custom", "filter": [ "lowercase", "asciifolding", "worddelimiter" ], "tokenizer": "standard" } } } } "mappings": { "faq": { "properties": { "answer": { "type": "string", "analyzer": "custom_analyzer" }, "answer_id": { "type": "long" }, "path": { "type": "string", "analyzer": "custom_analyzer" }, "question": { "type": "string", "analyzer": "custom_analyzer" } } } } 

And this is the request:

 client.prepareSearch(index) .setTypes(type) .setSearchType(SearchType.DFS_QUERY_THEN_FETCH) .setQuery(QueryBuilders.multiMatchQuery(inputText, "questions","answer^2","paths") .setSize(BUFFER_SIZE) .setFrom(i * BUFFER_SIZE) .execute() .actionGet(); 
0
elasticsearch
source share

No one has answered this question yet.

See similar questions:

8
Different Elicsearch search results for the same query

or similar:

265
Shards and replicas in Elasticsearch
36
ElasticSearch - High Indexing Throughput
8
Different Elicsearch search results for the same query
2
Unable to deal with emphasis on indexing and Elasticsearch searches
one
ElasticSearch - search for different doc_types with the same field name, but with different analyzers
one
Different results for a single query in an Elasticsearch cluster
one
indexing and full-text search in elasticsearch without dialectics using C # client Nest
0
Types of Indexes in Elasticsearch, Reasons for Performance
0
Elasticsearch sets () to retrieve all records without using scroll api
0
Original primary and Elicsearch replicas do not sync after bulk upload

All Articles