Sitecore Lucene搜索-跳过html标记

Sitecore Lucene搜索-跳过html标记,lucene,sitecore,lucene.net,sitecore6,Lucene,Sitecore,Lucene.net,Sitecore6,我通过以下方式创建Lucene查询: BooleanQuery innerQuery=new BooleanQuery(); multifiedqueryparser queryParser=新的multifiedqueryparser(fields.ToArray(),this.SearchIndex.Analyzer); queryParser.SetDefaultOperator(queryParser.Operator.AND); Query Query=queryParser.Pars

我通过以下方式创建Lucene查询:

BooleanQuery innerQuery=new BooleanQuery();
multifiedqueryparser queryParser=新的multifiedqueryparser(fields.ToArray(),this.SearchIndex.Analyzer);
queryParser.SetDefaultOperator(queryParser.Operator.AND);
Query Query=queryParser.Parse(queryParser.Escape(searchExpression.ToLowerInvariant());
if(boost.HasValue)
{
query.SetBoost(boost.Value);
}
Add(query,BooleanClause.occurrent.SHOULD);

问题在于,当字段包含html标记(例如
)且搜索表达式为“href”时,它会返回此项。是否可以将其设置为跳过“”标记中的搜索?

这实际上是爬网过程(即索引中存储的内容)的问题,而不是搜索查询的问题

我看到您正在使用Sitecore 6。看看这个pdf:

它有一节解释如何制作爬虫。这应该允许您随意解析内容,这样您就可以省略HTML标记中的任何内容