Precise/Regex Search

Hi

I'm running AppSearch for a research product. I store some IPv6 addresses in it: like

    2a02:168:2132::1
    2a02:168:2132::2
    2a02:168:be04::42

Now the problem is. If I try to search for 2a02:168:2132 it returns 2a02:168:be04::42too. Any idea? I know it's based on the prefix/... analyser which ElasticSearch uses by default. But is there something I could tweak in my query?

I've tried the following query but without any results...

{
   "search_fields": {
       "aaaa_record": {}
   },
   "result_fields": {
       "domain": {
           "raw": {}
       },
       "aaaa_record": {
           "raw": {}
       }
   },
   "query": "\"2a02:168:2132.*\""
}

Hey hey! You should be able to wrap the "2a02:168:2132" query with quotes (so leaving out the .* regex).

Before:

After:

Hope that helps! Also for what it's worth, if you're not seeing what I'm seeing, my screenshots are from latest 7.11 Enterprise Search.

Ahh I see. It's my fault because I've made some own mappings definition (sadly AppSearch doesn't support it)

But why is there no result if I search for "2a02:168:213"?

Is it because of the "iq_text_base"?

{
  "analyzer": "iq_text_base",
  "text": "2a02:168:2132::2"
}
{
    "tokens": [
        {
            "token": "2a02",
            "start_offset": 0,
            "end_offset": 4,
            "type": "<ALPHANUM>",
            "position": 0
        },
        {
            "token": "168",
            "start_offset": 5,
            "end_offset": 8,
            "type": "<NUM>",
            "position": 1
        },
        {
            "token": "2132",
            "start_offset": 9,
            "end_offset": 13,
            "type": "<NUM>",
            "position": 2
        },
        {
            "token": "2",
            "start_offset": 15,
            "end_offset": 16,
            "type": "<NUM>",
            "position": 3
        }
    ]
}

Ahh, I'm seeing the same thing as you with no results for "2a02:168:213". As to why, I'm probably the worst person to be asking this question of because I'm not as familiar with our inner Elasticsearch workings as my coworkers :grimacing: @Aurelien_Foucret1 can I tag you in on this once since you're working on our new precision tuners?

Pascal, it's possible we may not currently have the option/customization to get you the exact search response you want right now, but we're working on a way to let customers fine-tune precision vs. recall and configure more (but as a heads up, not all) of Elasticsearch's query options.

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