Hello Everyone,

Let's say I have an analyzer which has following token stream as an output.

*token stream : [], a, ab, [], c, [], d, de, def .....*

Now let's say I want to add another filter which will drop a certain tokens
based on whether adjacent token on the right side is [] or some string.

for a given token,
     drop/replace it by empty string it if there is a non-empty string
token on its right and
     keep it if there is an empty token string on its right.

based on this, the resulting token stream would be like this.

*desired output stream : [], [a]<dropped>, ab, [], c, [], d<dropped>,
de<dropped>, def *


*Is there any Filter available in solr with which this can be achieved?*
*If writing a custom filter is the only possible option then I want to know
whether its possible to access adjacent tokens in the custom filter?*

*Any idea about this would be really helpful.*

Thanks,
Pratik

Reply via email to