Error - No handler for type [wildcard]

Hi, I'm trying to experiment with the wildcard field since i'm trying to perform queries over text fields that seem to fit perfectly with the description in this article: https://www.elastic.co/blog/find-strings-within-strings-faster-with-the-new-elasticsearch-wildcard-field

The problem that I'm facing right now is that I'm not able to create a testing index with a wildcard field. Following the documentation, I understand that the wildcard belongs to X-Pack but this particular feature of X-Pack is available for Basic license and that it's already preinstalled in my current working version: 7.9
Am I missing something?

Furthermore, I think that I might be facing other problems with this field. Since I'm working with spanish values that are extracted from PDFs, I found that the best way to normalize my content was using the icu_analyzer which helped me with the special characters folding. If I make this wildcard field work, will it be able to be combined with the icu filters?

Let me know if there's any relevant information that I've missed in this post and I will provide it ASAP.
Thanks!

What is the output of:

GET /
GET /_license

?

To my surprise I'm using ES 7.8.1

GET /
{
  "name" : "...",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "4-plonNsS4et8myszLdNcw",
  "version" : {
   "number" : "7.8.1",
   "build_flavor" : "default",
   "build_type" : "zip",
   "build_hash" : "b5ca9c58fb664ca8bf9e4057fc229b3396bf3a89",
   "build_date" : "2020-07-21T16:40:44.668009Z",
   "build_snapshot" : false,
    "lucene_version" : "8.5.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

GET /_license
{
  "license" : {
   "status" : "active",
   "uid" : "...",
    "type" : "basic",
    "issue_date" : "2020-08-09T12:04:59.445Z",
    "issue_date_in_millis" : 1596974699445,
    "max_nodes" : 1000,
    "issued_to" : "elasticsearch",
    "issuer" : "elasticsearch",
    "start_date_in_millis" : -1
  }
}

I hope this is useful (I've erased license uid and name). I am already exploring other solutions without wildcard, but it would be great to solve this aswell...
Thank you for you time.

Currently wildcard field does not support normalizers. It is generally targeted towards machine generated content, which is not served well by "opinionated" language processors typically used for text. While the meaning of words in text don't change with some light processing, the sorts of things machines understand (urls, file paths, package names) do change meaning if you treat them in any way. Some file systems are case insensitive so we will offer search options for case insensitive matching but any further normalisation isn't something we've felt the need for yet.

What sort of content do you have and why is a text field not a good fit?

Thank you for your reply.

I was trying to perform queries that would be able to "match_phrase", in this way they would treat the query with the order constrain between tokens but allowing the last element to be treated as a prefix (match_phrase_prefix) prefix and the first word as a suffix (which I think there's no built_in feature).

Example:
Performing the search for "joaquin ormachea" would be matching the documents containing:

He is Joaquin Ormachea
He isJoaquin Ormachea
He is Joaquin Ormachea.

What I've been trying today was building a combined analyzer. This is what I've ended up with:

PUT testing_ngram/
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_special_analyzer": {
          "type": "custom",
          "tokenizer": "my_tokenizer",
          "char_filter": ["icu_normalizer"],
          "filter": ["lowercase", "icu_folding", "icu_normalizer" ]
        }
      },
      "tokenizer": {
        "my_tokenizer": {
          "type": "ngram",
          "min_gram": 1,
          "max_gram": 1,
          "token_chars": [
            "letter",
            "digit"
          ]
        }
      }
    } 
  },
  "mappings": {
    "properties": {
      "text": {
              "type": "text",
              "analyzer": "my_special_analyzer",
              "search_analyzer": "my_special_analyzer"
            }
    }
  }
}

I couldn't test it enough yet but it seem's to be working. I would appreciate having your opinion.

Wildcard fields, like keyword fields do not support phrase type queries because these queries are used to find sequences of words and these fields logically contain only one big word.
Instead wildcard is optimised for finding character sequences anywhere inside a string using regex or wildcard queries.

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