Hello,  
I'm using apache lucene 6.3.0 and I'm trying to implement a custom analyzer
for my index which allows searching on filenames. The problem is I want to
allow the user to search using the exact filename also, but the Analyzer
only has individual tokens and not the original filename as one of the
token.  

    Analyzer analyzer = CustomAnalyzer.builder()
                   .withTokenizer(StandardTokenizerFactory.class)
                   .addTokenFilter(LowerCaseFilterFactory.class)
                   .addTokenFilter(WordDelimiterFilterFactory.class)
                   .build();  

Input:- power_shot_black_neo.txt  
  
Expected Output:-  
power_shot_black_neo.txt  
power  
shot  
black  
neo  
txt  
  
  
Actual output:-  
power  
shot  
black  
neo  
txt  


Regards,
Sandesh




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Preserve-the-original-input-string-token-in-while-making-a-CustomAnalyzer-tp4348162.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to