[SOLVED] Escape hyphen in Kibana


(alexandre) #1

Hi all,

Kibana version: 4.4.2

When I make a search in Kibana web interface, it doesn't work like excepted for string with hyphen character included.

Example:

Search: "test-10"
Result: test-10

Search: test-10
Result: test-10

Search: test\-10
Result: test-10

Search: "test\-10"
Result: test-10

As you can see, the hyphen is never catch in the result.

I made a TCPDUMP:

  • Query format with not escape hyphen: @source_host:"test-"

  • Query format with escape hyphen: @source_host:"test\\-"

So it escapes the "" character but not the hyphen character.

Do you know why ? Regarding Apache Lucene documentation, it should be work.

Thanks in advance for your help !
Alex


(Lukas Olson) #2

Hmm... Not sure if this makes any difference, but is the field you're searching analyzed?


(alexandre) #3

Hi,

Sorry, I took a long time to answer. But yes it is analyzed.

Thanks for your reply !


(Lukas Olson) #4

Do you have a @source_host.raw unanalyzed field? If not, you may need to add one to your mapping to be able to search the way you'd like.


(alexandre) #5

Thanks I will try.


(Shiva Ram) #6

May I know how this is marked as SOLVED ?

I'm still observing this issue and could not see a solution in this thread?


(system) #7