From: muhammad i. <m.i...@gm...> - 2011-01-05 18:00:27
|
> > > please could you write how you instantiate the highlighter? Which scorer do > you use? > m_highlightQuery = m_pMainQuery->clone(); Query * q = m_highlightQuery->rewrite(m_pReader); m_queryScorer = new QueryScorer(q); m_highlighter = new Highlighter(m_queryScorer); > > Are you using the highlighter version from the highlighter branch? > No i am on master branch and i can not find highlighter branch , i merged the wildcardQuery_fix and memory_leaks branches to master. > > I would try to find the place, where the exception is thrown. > > > > But still, there is a problem along with the ConstantScoreQuery. Both ways > to highlight a document > > that are available now will not work because: > > 1) If you use the "basic" highlighting - means you use the > CL_NS2(search,highlight)::QueryScorer - than this scorer calls the > extractTerms() method which is not > > implemented in ConstantScoreQuery as this query uses filters to match > documents. > > 2 the "exact" highlighting - means you use the > CL_NS2(search,highlight)::SpanHighlightScorer - also does not highlight > ConstantScoreQueries for the same reason. > > is this means that i can not use WildcardQuery with highlighter without setting the maximum clauses? > But, you could use this scorer with the original WildcardQuery and allow > rewriting queries in place. Then if your documents are not too long and > > the single documents does not contain more the the max clause limit > different matching terms, then this would work. > > > > If you want to use the new highlighter scorer then I could send you piece > of code, how to call it. > > > Note :- I can not use setMaxClauses because my documents are too long and if i use setMaxClauses i always get too many clauses exception Mohammad Ismael |