Custom fragmenter

View: New views
4 Messages — Rating Filter:   Alert me  

Custom fragmenter

by Brian Whitman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by hossman_lucene :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


: 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


Re: Custom fragmenter

by Mike Klaas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 5/2/07, Brian Whitman <brian.whitman@...> 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

by Brian Whitman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On May 2, 2007, at 3:21 PM, Mike Klaas wrote:

> On 5/2/07, Brian Whitman <brian.whitman@...> 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!