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 Kalpana <ks...@portalsolutions.net> on 2016/07/13 21:34:09 UTC

RE: Strip HTML Tags and Store

Hello

I am trying to do something similar, I want to strip the html tags before
being stored. Where do I add this code in Solrconfig.xml? which section?

Thanks much
Kalpana



--
View this message in context: http://lucene.472066.n3.nabble.com/Strip-HTML-Tags-and-Store-tp4067208p4287064.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Strip HTML Tags and Store

Posted by Kalpana <ks...@portalsolutions.net>.
I got the solution to work - thanks so much

I added the below to solrconfig.xml

<updateRequestProcessorChain name="html-strip-features">
                                <processor class="solr.HTMLStripFieldUpdateProcessorFactory">
                                                <str name="fieldName">health_content_t</str>
                                </processor>
                                <processor class="solr.LogUpdateProcessorFactory" />
                                <processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>

<requestHandler name="/update" class="solr.UpdateRequestHandler">
                                <lst name="defaults">
                                                <str name="update.chain">html-strip-features</str>
                                </lst>
</requestHandler>

From: Markus Jelsma-2 [via Lucene] [mailto:ml-node+s472066n4287069h15@n3.nabble.com]
Sent: Wednesday, July 13, 2016 6:08 PM
To: Kalpana Sivanandan <ks...@portalsolutions.net>
Subject: RE: Strip HTML Tags and Store

Hello - just as mentioned in the thread:

> Add to your solrconfig:
>
>   <updateRequestProcessorChain name="html-strip-features">
>     <processor class="solr.HTMLStripFieldUpdateProcessorFactory">
>       <str name="fieldName">features</str>
>     </processor>
>     <processor class="solr.LogUpdateProcessorFactory" />
>     <processor class="solr.RunUpdateProcessorFactory" />
>   </updateRequestProcessorChain>

And point your update handler config to this html-strip-features update processor chain.

M.


-----Original message-----

> From:Kalpana <[hidden email]</user/SendEmail.jtp?type=node&node=4287069&i=0>>
> Sent: Wednesday 13th July 2016 23:34
> To: [hidden email]</user/SendEmail.jtp?type=node&node=4287069&i=1>
> Subject: RE: Strip HTML Tags and Store
>
> Hello
>
> I am trying to do something similar, I want to strip the html tags before
> being stored. Where do I add this code in Solrconfig.xml? which section?
>
> Thanks much
> Kalpana
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Strip-HTML-Tags-and-Store-tp4067208p4287064.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Strip-HTML-Tags-and-Store-tp4067208p4287069.html
To unsubscribe from Strip HTML Tags and Store, click here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4067208&code=a3NpdmFuYW5kYW5AcG9ydGFsc29sdXRpb25zLm5ldHw0MDY3MjA4fDE0MzYwODg4Mjk=>.
NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://lucene.472066.n3.nabble.com/Strip-HTML-Tags-and-Store-tp4067208p4287191.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Strip HTML Tags and Store

Posted by Kalpana <ks...@portalsolutions.net>.
Thanks for your reply.

I have attached my config. I wanted the field health_content_t to be stripped off of Html and stored.

Should the below lines be placed above the Update handler and also what do I do to update the handler?


From: Markus Jelsma-2 [via Lucene] [mailto:ml-node+s472066n4287069h15@n3.nabble.com]
Sent: Wednesday, July 13, 2016 6:08 PM
To: Kalpana Sivanandan <ks...@portalsolutions.net>
Subject: RE: Strip HTML Tags and Store

Hello - just as mentioned in the thread:

> Add to your solrconfig:
>
>   <updateRequestProcessorChain name="html-strip-features">
>     <processor class="solr.HTMLStripFieldUpdateProcessorFactory">
>       <str name="fieldName">features</str>
>     </processor>
>     <processor class="solr.LogUpdateProcessorFactory" />
>     <processor class="solr.RunUpdateProcessorFactory" />
>   </updateRequestProcessorChain>

And point your update handler config to this html-strip-features update processor chain.

M.


-----Original message-----

> From:Kalpana <[hidden email]</user/SendEmail.jtp?type=node&node=4287069&i=0>>
> Sent: Wednesday 13th July 2016 23:34
> To: [hidden email]</user/SendEmail.jtp?type=node&node=4287069&i=1>
> Subject: RE: Strip HTML Tags and Store
>
> Hello
>
> I am trying to do something similar, I want to strip the html tags before
> being stored. Where do I add this code in Solrconfig.xml? which section?
>
> Thanks much
> Kalpana
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Strip-HTML-Tags-and-Store-tp4067208p4287064.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Strip-HTML-Tags-and-Store-tp4067208p4287069.html
To unsubscribe from Strip HTML Tags and Store, click here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4067208&code=a3NpdmFuYW5kYW5AcG9ydGFsc29sdXRpb25zLm5ldHw0MDY3MjA4fDE0MzYwODg4Mjk=>.
NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


solrconfig.xml (38K) <http://lucene.472066.n3.nabble.com/attachment/4287080/0/solrconfig.xml>




--
View this message in context: http://lucene.472066.n3.nabble.com/Strip-HTML-Tags-and-Store-tp4067208p4287080.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Strip HTML Tags and Store

Posted by Markus Jelsma <ma...@openindex.io>.
Hello - just as mentioned in the thread:

> Add to your solrconfig: 
> 
>   <updateRequestProcessorChain name="html-strip-features"> 
>     <processor class="solr.HTMLStripFieldUpdateProcessorFactory"> 
>       <str name="fieldName">features</str> 
>     </processor> 
>     <processor class="solr.LogUpdateProcessorFactory" /> 
>     <processor class="solr.RunUpdateProcessorFactory" /> 
>   </updateRequestProcessorChain> 

And point your update handler config to this html-strip-features update processor chain.

M.
 
 
-----Original message-----
> From:Kalpana <ks...@portalsolutions.net>
> Sent: Wednesday 13th July 2016 23:34
> To: solr-user@lucene.apache.org
> Subject: RE: Strip HTML Tags and Store
> 
> Hello
> 
> I am trying to do something similar, I want to strip the html tags before
> being stored. Where do I add this code in Solrconfig.xml? which section?
> 
> Thanks much
> Kalpana
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Strip-HTML-Tags-and-Store-tp4067208p4287064.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>