Subdomain term Query

Hi All,

I am building a lookup query for matching domain names using terms query.
My lookup index is indexed as keyword.

My search index has the domain field indexed as text and keyword both.

There are possible four scenarios:

  1. All keyword approach -Lookup index field indexed as keyword and search index field indexed as keyword as well.
    Results: Only exact matches are returned after lookup. This does not allow subdomain lookup unless it's indexed in the lookup index.

  2. Lookup field is indexed as keyword and search index field is indexed as text.
    Results: Exact match is working sub domains are not matched

  3. Lookup field is indexed as text as well as search field is text
    Results: Exact match is working sub domains are not matched

  4. Lookup term is indexed as text and search field as keyword
    Results: Exact match is working sub domains are not matched

These results are after testing on ES 7.5.2.
Any guidance would be appreciated. The idea is to identify any subdomains appearing in the search index against a lookup in the lookup index using terms query.

~ Ankit

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