You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Atali DAOUD <at...@gmail.com> on 2006/11/27 03:01:19 UTC
Highlighter 1.5 bug with multi-words query
Hi,
I correct QueryTermExtractor.cs (146) because I had an exception with
multi-words query.
[FieldAccessException: Lucene.Net.Search.BooleanClause.query]
Lucene.Net.Search.Highlight.QueryTermExtractor.GetTermsFromBooleanQuery(BooleanQuery query, HashSetSupport terms, Boolean prohibited, String fieldName) +0
Lucene.Net.Search.Highlight.QueryTermExtractor.GetTerms(Query query, HashSetSupport terms, Boolean prohibited, String fieldName)
Lucene.Net.Search.Highlight.QueryTermExtractor.GetTerms(Query query, Boolean prohibited, String fieldName)
Lucene.Net.Search.Highlight.QueryTermExtractor.GetTerms(Query query, Boolean prohibited)
Lucene.Net.Search.Highlight.QueryTermExtractor.GetTerms(Query query)
Lucene.Net.Search.Highlight.QueryScorer..ctor(Query query)
search.SearchForm.SearchAdanoo() in c:\inetpub\wwwroot\search\index.aspx.cs:259
search.SearchForm.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\search\index.aspx.cs:315
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
This is my path:
private static void GetTermsFromBooleanQuery(BooleanQuery query,
HashSetSupport terms, bool prohibited, string fieldName)
{
BooleanClause[] queryClauses = query.GetClauses();
int i;
for (i = 0; i < queryClauses.Length; i++)
{
if (prohibited || !queryClauses[i].IsProhibited())
GetTerms(queryClauses[i].GetQuery(), terms,
prohibited, fieldName);
}
}
Atali DAOUD
Adanoo Inc.