elasticsearch - Java method name analyzer -


i indexing request logs java app , logs contain key method names , time taken. method names full method names

com.example.domain.file[] com.example.service.folderservice.getfiles() throws com.example.exception 

in order search method name or type (like getfiles or file) believe need define custom analyzer tokenizes package , method names. such analyzer exist?

i verified can map field not_analyzed , use wildcard search. docs using wildcard not performant , recommends preparing index correctly.

looking other suggestions, ideas well.

i think don't have requirements set, yet. here's i'd start with:

put /index {   "settings": {     "analysis": {       "filter": {         "code": {           "type": "pattern_capture",           "preserve_original": 1,           "patterns": [             "(\\p{ll}+|\\p{lu}\\p{ll}+|\\p{lu}+)",             "(\\d+)"           ]         }       },       "analyzer": {         "code": {           "tokenizer": "pattern",           "filter": [             "code",             "lowercase"           ]         }       }     }   },   "mappings": {     "test": {       "properties": {         "code": {           "type": "string",           "analyzer": "code"         }       }     }   } } 

test data:

post /index/test/1 {   "code": "com.example.domain.file[] com.example.service.folderservice.getfiles() throws com.example.exception" } 

query:

get /index/test/_search {   "query": {     "match": {       "code": "file"     }   } } 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -