lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Xinlei Wang <>
Subject Question: Using Shingle Analyzer NGramAnalyzerWrapper in Lucene
Date Tue, 26 Feb 2008 20:31:37 GMT

In Lucene, I'm trying to perform word-level bi-gram query parsing using 
NGramAnalyzerWrapper.  I'm couldn't get any word pairs in the parsed query 
and I was wondering what I should do to make this work.  I'm using Lucene 

I'm using the files from:

My code is:

NGramAnalyzerWrapper analyzer = new NGramAnalyzerWrapper(new
 	StandardAnalyzer(), 2);
QueryParser p = new QueryParser("info", analyzer);
Query query = lyricsParser.parse("this is my query");

When I run this, I get the following output, which has no bi-grams:

lyrics:this lyrics:is lyrics:a lyrics:query

Thank you for your help!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message