private BooleanQuery InitialQuery(string keyword) { var bq = new BooleanQuery(); bq.Add(new QueryParser("Content", _panGuAnalyzer).Parse(keyword), BooleanClause.Occur.MUST); return bq; }
目前代码是这样的,但搜索结果是or的关系,and的语法是什么样的
http://www.cnblogs.com/psforever/archive/2011/10/06/2200019.html
//PhraseQuery query = new PhraseQuery(); //且设置 BooleanQuery queryOr = new BooleanQuery(); //或设置