You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/09 17:13:01 UTC

[jira] [Commented] (AMBARI-24847) Logsearch: Cannot search for a term that includes spaces or dashes

    [ https://issues.apache.org/jira/browse/AMBARI-24847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16681721#comment-16681721 ] 

ASF GitHub Bot commented on AMBARI-24847:
-----------------------------------------

kasakrisz opened a new pull request #18: AMBARI-24847 - Logsearch: Cannot search for a term that includes spaces or dashes
URL: https://github.com/apache/ambari-logsearch/pull/18
 
 
   # What changes were proposed in this pull request?
   
   - On Logsearch UI if a sentence like "Some terrible error has happened" is used for message filtering a huge amount of irrelevant log entries is pulled, this is mainly because the search term is tokenized and finds every line that contains any of the words.
   - The UI replaces all whitespace characters in the search terms to `+` char. It is a boolean operator: The `+` symbol (also known as the "required" operator) requires that the term after the `+` symbol exist somewhere in a field in at least one document in order for the query to return a match.
   - Special solr query characters can not be used in search terms because the log_message field is tokenized by StandardTokenizer and it eliminates the special characters.
   
   Fix.: 
   - switch to WhiteSpaceTokenizer for log_message field.
   - do not replace whitespace chars in the search term on the UI
   - phrase search terms can be specified using `"` like:
   ```Message:"Some terrible error has happened (line:42)"```
   
   Integration tests for query converters are added.
   
   ## How was this patch tested?
   
   UTs and ITs re passed
   Manually:
   
   1. Deploy ambari and a cluster: logsearch, zookeeper, infra solr
   2. Login to Logsearch and performs searches: specify search term for the Message field
   3. Check the result contains only the relevant entries

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Logsearch: Cannot search for a term that includes spaces or dashes
> ------------------------------------------------------------------
>
>                 Key: AMBARI-24847
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24847
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-logsearch
>    Affects Versions: 2.8.0
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.8.0
>
>
> If I type the following "Some terrible error has happened" I got a huge amount irrelevant results from Logsearch, this is mainly because the search term is tokenized and finds every line that contains any of the words even if I am using ".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)