Re: Implement SpanScorer on 2.9 lucene lib!

2009-10-01 Thread Mark Miller
Felipe Lobo wrote: > Here's the code: > -- > Highlighter highlighter = new Highlighter(new SimpleHTMLFormatter(), new > QueryScorer(query)); > > highlighter.setTextFragmenter(new SimpleFragmenter(9)); > > String fieldName = "Title"; > > St

Re: Implement SpanScorer on 2.9 lucene lib!

2009-10-01 Thread Felipe Lobo
Here's the code: -- Highlighter highlighter = new Highlighter(new SimpleHTMLFormatter(), new QueryScorer(query)); highlighter.setTextFragmenter(new SimpleFragmenter(9)); String fieldName = "Title"; String text = document.getField(fieldN

Re: Implement SpanScorer on 2.9 lucene lib!

2009-10-01 Thread Mark Miller
Felipe Lobo wrote: > Hi, thanks for the answer but it didn't work. > I stopped rewriting the query and used the queryscorer but it don't > highlight. > The part of the query i'm doing wildcard is the number part, like this: > "HC 100930027253" > The HC is hightlighted but the numbers aren't: > "Ha

Re: Implement SpanScorer on 2.9 lucene lib!

2009-10-01 Thread Felipe Lobo
Hi, thanks for the answer but it didn't work. I stopped rewriting the query and used the queryscorer but it don't highlight. The part of the query i'm doing wildcard is the number part, like this: "HC 100930027253" The HC is hightlighted but the numbers aren't: "Habeas Corpus HC 100930027253 ES 10

Re: Implement SpanScorer on 2.9 lucene lib!

2009-09-30 Thread Mark Miller
Felipe Lobo wrote: > Hi, i updated my lucene lib to 2.9.0 and i'm trying to instanciate the > spanscorer but the constructor is protected. > I looked in the javadoc of lucene and saw 2 subclasses of it > (PayloadNearQuery.PayloadNearSpanScorer, > PayloadTermQuery.PayloadTermWeight.PayloadTermSpanSc

Implement SpanScorer on 2.9 lucene lib!

2009-09-30 Thread Felipe Lobo
Hi, i updated my lucene lib to 2.9.0 and i'm trying to instanciate the spanscorer but the constructor is protected. I looked in the javadoc of lucene and saw 2 subclasses of it (PayloadNearQuery.PayloadNearSpanScorer, PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer). Using this classes is