lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Kan <solrexp...@gmail.com>
Subject Re: Conditional invocation of HTMLStripCharFactory
Date Mon, 02 Mar 2015 11:37:07 GMT
Hi,

This is an interesting question.

Just an idea: make a custom extension of
https://github.com/apache/lucene-solr/blob/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilterFactory.java
class and examine the field value before executing the HTMLStripCharFilter.
The only issue is how to access *other* field in the document from the
factory, than the *current* field. Perhaps, make some sort of meta-factory?

It would be easier to implement the described idea, if instead of checking
other field you were able to inject some control sequence into the
document's text field, that would tell the custom factory whether to
execute or not. The same factory can remove the control sequence. This
should be possible to achieve with an UpdateRequestProcessorFactory.


On Sun, Mar 1, 2015 at 2:20 PM, SolrUser1543 <ostap26@gmail.com> wrote:

> is it possible to make a considional invocation of a HTMLStripCharFactory?
> I
> want to decide when to enable or disable it according to a value of
> specific
> field in my document.  E.g. when a value of field A is true, then enable a
> filter on field B,or disable otherwise.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Conditional-invocation-of-HTMLStripCharFactory-tp4190010.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Dmitry Kan
Luke Toolbox: http://github.com/DmitryKey/luke
Blog: http://dmitrykan.blogspot.com
Twitter: http://twitter.com/dmitrykan
SemanticAnalyzer: www.semanticanalyzer.info

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message