Prefix Search

Hi

Is it possible to use a PrefixSearch with Appsearch?

With Elasticsearch it's easy. Something like that:

{
  "query": {
    "match_phrase_prefix": {
      "aaaa_record$string": {
        "query": "2a02:168:2132:"
      }
    }
  }
}

or

{
  "query": {
    "prefix": {
      "aaaa_record$string": {
        "value": "2a02:168:2132:"
      }
    }
  }
}

Any idea how to use it with AppSearch?

Hey @pesc,

There's no current way to explicitly use a prefix search. However, matching on the prefix of a field should still work in most cases. What version of App Search are you running? This behavior was slightly changed in 7.12, although the intent was actually to improve typo-tolerance.

Ross

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