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 Hugo Barauna <hu...@gmail.com> on 2008/07/08 15:20:15 UTC

Pre-processor for stored fields

Hi,

I already haved aked this, but I didn't get any good answer, so I will try
again. I need to pre-process a stored field before it is saved. Just like a
field that is gonna be indexed. I would be good to apply an analyzer to this
stored field.

My problem is that I have to send to solr html documents and use a HTML
filter to remove the HTML tags. But that doesn't work for the stored
representation of that field.

I found some possible <https://issues.apache.org/jira/browse/SOLR-314>
solutions <https://issues.apache.org/jira/browse/SOLR-269> to my problem,
but I would like to know if there is something better.

Thanks!

-- 
Hugo Pessoa de Baraúna

"Se vc faz tudo igual a todo mundo, não pode esperar resultados diferentes."

http://hugobarauna.blogspot.com/

Re: Pre-processor for stored fields

Posted by Norberto Meijome <fr...@meijome.net>.
On Tue, 8 Jul 2008 10:20:15 -0300
"Hugo Barauna" <hu...@gmail.com> wrote:

> Hi,
> 
> I already haved aked this, but I didn't get any good answer, so I will try
> again. I need to pre-process a stored field before it is saved. Just like a
> field that is gonna be indexed. I would be good to apply an analyzer to this
> stored field.
> 
> My problem is that I have to send to solr html documents and use a HTML
> filter to remove the HTML tags. But that doesn't work for the stored
> representation of that field.
> 
> I found some possible <https://issues.apache.org/jira/browse/SOLR-314>
> solutions <https://issues.apache.org/jira/browse/SOLR-269> to my problem,
> but I would like to know if there is something better.
> 
> Thanks!
> 

Hi Hugo,
I replied to your email on June 30th. The answer seems to be the same. If you have other specific questions, shoot.

B

_________________________
{Beto|Norberto|Numard} Meijome

Anyone who isn't confused here doesn't really understand what's going on.

I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned.

Re: Pre-processor for stored fields

Posted by Ryan McKinley <ry...@gmail.com>.
If all you are doing is stripping text from HTML, the best option is  
probably to just do that on the client *before* you send it to solr.

If you need to do something more complex -- or that needs to rely on  
other solr configurations you can consider using an  
UpdateRequestProcessor.  Likely you would override the processAdd  
function and augment/modify the document coming in.

An example of this is in the locallucene project, check:
https://locallucene.svn.sourceforge.net/svnroot/locallucene/trunk/localsolr/src/com/pjaol/search/solr/update/LocalUpdateProcessorFactory.java

ryan



On Jul 8, 2008, at 9:20 AM, Hugo Barauna wrote:
> Hi,
>
> I already haved aked this, but I didn't get any good answer, so I  
> will try
> again. I need to pre-process a stored field before it is saved. Just  
> like a
> field that is gonna be indexed. I would be good to apply an analyzer  
> to this
> stored field.
>
> My problem is that I have to send to solr html documents and use a  
> HTML
> filter to remove the HTML tags. But that doesn't work for the stored
> representation of that field.
>
> I found some possible <https://issues.apache.org/jira/browse/SOLR-314>
> solutions <https://issues.apache.org/jira/browse/SOLR-269> to my  
> problem,
> but I would like to know if there is something better.
>
> Thanks!
>
> -- 
> Hugo Pessoa de Baraúna
>
> "Se vc faz tudo igual a todo mundo, não pode esperar resultados  
> diferentes."
>
> http://hugobarauna.blogspot.com/