lucene-lucene-net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Atali DAOUD <atali.da...@gmail.com>
Subject Highlighter 1.5 bug with multi-words query
Date Mon, 27 Nov 2006 02:01:19 GMT
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.

Mime
View raw message