Prepended Term Search is Faster than Term Search for Nested Field

Hi there:

I am very new to Elasticsearch implementation and luckily I got this forum. Just wondering if I can get some help please regarding a scenario that we are facing for our Elasticsearch instance.

We have got like 100 million records in an index and we are trying to search records based on terms. So we have nested field like below in every record:

"identifiers" : [ 
      "idValue" : "123456",
      "valueCodeConcat" :  "TYPE005123456"

If we do a search by TYPE005123456, it is way faster than if we do a search by 123456. I know behind the scene it is using Lucene indexing which is inverse indexing. However not sure how prepending terms with type value (e.g. TYPE005, TYPE001 etc.) is making search faster.

Any help would be much appreciated.


Please share your queries and mappings as well as information about which Elasticsearch version you are using.

Hi Christian, I need to get back on this. Thanks for the reply. I need to verify what has been done till date from other team members.

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