标签:1.0 bool sts string analyzer color parse author ash
/** * 搜索域加权 */ Map<String, Float> boosts = new HashMap<>(); boosts.put("title", 1.2f); boosts.put("author", 1.1f); boosts.put("content", 1.0f); /** * 多条件之间的关系 */ BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD, BooleanClause.Occur.SHOULD, BooleanClause.Occur.SHOULD}; Query query=MultiFieldQueryParser.parse(key, new String[]{"title","author","content"},flags, analyzer);
lucene 多字段查询-MultiFieldQueryParser
标签:1.0 bool sts string analyzer color parse author ash
原文地址:http://www.cnblogs.com/qingyibusi/p/6187402.html