You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Brian Whitman <br...@variogr.am> on 2007/05/02 18:09:31 UTC

Custom fragmenter

Would love to set a custom fragmenter in Solr for highlighting. But I  
don't see a way to change the fragmenter "on the fly." Should this be  
a solrconfig/schema setting?



Re: Custom fragmenter

Posted by Brian Whitman <br...@variogr.am>.
On May 2, 2007, at 3:21 PM, Mike Klaas wrote:

> On 5/2/07, Brian Whitman <br...@variogr.am> wrote:
>> Would love to set a custom fragmenter in Solr for highlighting. But I
>> don't see a way to change the fragmenter "on the fly." Should this be
>> a solrconfig/schema setting?
>
> It would be nice to able to register custom formatters and
> subsequently use them in queries:


Just to make sure, I was talking about fragmenters, not formatters --  
but having custom formatters in solrconfig would be good too!




Re: Custom fragmenter

Posted by Mike Klaas <mi...@gmail.com>.
On 5/2/07, Brian Whitman <br...@variogr.am> wrote:
> Would love to set a custom fragmenter in Solr for highlighting. But I
> don't see a way to change the fragmenter "on the fly." Should this be
> a solrconfig/schema setting?

It would be nice to able to register custom formatters and
subsequently use them in queries:

<highlighting>
    <formatter name="mycustom">com.business.MyFormatter</formatter>
</highlighting>

...&hl.formatter=mycustom

The main reason I've hesitated in adding this kind of configuration is
that it exposes Solr's implementation details (in particular, the use
of lucene's contrib Highlighter package).  There are other options
floating out there (including a span-based one which would correctly
highlight phrase matches).

Then again, chances are that any new highlighting package would
endeavour to support old-style formatters and scorers anyway...

-Mike

Re: Custom fragmenter

Posted by Chris Hostetter <ho...@fucit.org>.
: don't see a way to change the fragmenter "on the fly." Should this be
: a solrconfig/schema setting?

yeah, it would probably make sense if there was a way to specify that in
the config ... i'm not really sure exactly how it shoudl work though since
i don't relaly use highlighting ... on one hand we could have a set of
named Fragmenters similar to the set of named request handlers and the
HighlightingUtils could access it directly based on the query params.  on
the other hand each request handler could have it's own specified list of
Fragmenter classes.

Mike's really the go-to-guy for highlighting, i'm sure he's thoughta
little bit about what a patch like this should look like.



-Hoss