You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ahmet Arslan <io...@yahoo.com.INVALID> on 2015/06/11 12:38:55 UTC

Re: DocTransformers for restructuring output, e.g. Highlighting

Hi Upayavira,

I was going to suggest SOLR-3479 to Edwin, I saw your old post.

Regarding your suggestion, there is an existing ticket : 
https://issues.apache.org/jira/browse/SOLR-3479

I think SOLR-7665 is also relevant to your question.

Ahmet
 



On Sunday, June 23, 2013 9:54 PM, Upayavira <uv...@odoko.co.uk> wrote:
I've just taken a peek at the src for DocTransformers. They get given a
TransformContext. That context contains the query and a few other bits
and pieces.

If it contained the response, DocTransformers would be able to do output
restructuring. The best example is hit highlighting. If you did:

&hl=on&hl.fl=name&fl=*,[highlight:name]

you would no longer need to seek the highlighted strings in another part
of the output.

The conceptual downside of this approach is that we might expect the
highlighting to be done inside the DocTransfomer not a search component,
i.e. not needing the hl=on&hl.fl=name bit. That is, this would be a
great change for existing Solr users, but might be confusing for new
Solr users.

I did try to move the highlighting code itself into the DocTransformer,
but stalled at the point at which it needed to be CoreAware, as
DocTransformers aren't allowed to be. Without that, it isn't possible to
access the Highlighter components in the core's configuration.

Thoughts? Is this a useful feature?

Upayavira

Re: DocTransformers for restructuring output, e.g. Highlighting

Posted by Upayavira <uv...@odoko.co.uk>.
Yes! It only needs to be done!

On Thu, Jun 11, 2015, at 11:38 AM, Ahmet Arslan wrote:
> Hi Upayavira,
> 
> I was going to suggest SOLR-3479 to Edwin, I saw your old post.
> 
> Regarding your suggestion, there is an existing ticket : 
> https://issues.apache.org/jira/browse/SOLR-3479
> 
> I think SOLR-7665 is also relevant to your question.
> 
> Ahmet
>  
> 
> 
> 
> On Sunday, June 23, 2013 9:54 PM, Upayavira <uv...@odoko.co.uk> wrote:
> I've just taken a peek at the src for DocTransformers. They get given a
> TransformContext. That context contains the query and a few other bits
> and pieces.
> 
> If it contained the response, DocTransformers would be able to do output
> restructuring. The best example is hit highlighting. If you did:
> 
> &hl=on&hl.fl=name&fl=*,[highlight:name]
> 
> you would no longer need to seek the highlighted strings in another part
> of the output.
> 
> The conceptual downside of this approach is that we might expect the
> highlighting to be done inside the DocTransfomer not a search component,
> i.e. not needing the hl=on&hl.fl=name bit. That is, this would be a
> great change for existing Solr users, but might be confusing for new
> Solr users.
> 
> I did try to move the highlighting code itself into the DocTransformer,
> but stalled at the point at which it needed to be CoreAware, as
> DocTransformers aren't allowed to be. Without that, it isn't possible to
> access the Highlighter components in the core's configuration.
> 
> Thoughts? Is this a useful feature?
> 
> Upayavira