Skip to content

Search tool with character . doesn´t work. (dot character) #1844

Description

@mrkricmat

Describe the bug
If i search with a word that include . results in non hit in autocomplete and it´s not possible to show the result in the map. The inputstring is translated to "!.". If i use the search word "kv." and have av value in the source table start starts with "kv." the search value is translated as " "kv!.*" which gives mismatch.

Updated info: This issue dependends when programmer whants to replacing dot to ! to avoid regex dot meaning.
And maybe the problem occurs here.
return e.prototype = {
regRep: function(n) {
return n.replace(/[-[]/{}()*+?.\^$|]/g, "\$&")
},
Some where is dot in searchstring changed to "!."

The second issue here is when the comparison occurs hasnt any replacemnt of dot character occurs in the comparisation string. It leads to comparisaion in search like "kv." == "kv!." which is wrong. It think the programmer wants "KV!"=="KV!".

Steps to reproduce

  1. Go to 'Search input field'
  2. Write "Kv." as sample, other wise you can test with other words that include . in the value field

*** Workaround ***
i will try to change "." in comparisation field to "!.# by cql filter in geoserver in an extra field thas its exclusive for hajkmap search reason.

Expected behavior

Screenshots or video(s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions