【问题标题】:How to get a record deleted from Endeca Index using Record Manipulator如何使用记录操纵器从 Endeca 索引中删除记录
【发布时间】:2020-11-06 08:23:55
【问题描述】:
I have a test case in endeca in which I have to drop record if a particular word is present in one Url attribute of a record.
E.g: URL: www.abc.com/tree/temp/circle/hello/....

I need to check if word "temp" is present in url attribute then that record should be dropped from getting indexed. I am using below code in Record Manipulator but seems some issue because of which it is not working

    <EXPRESSION LABEL="" NAME="REMOVE" TYPE="VOID" URL=""> 
    <EXPRESSION LABEL="" NAME="IF" TYPE="VOID" URL="">      
    <EXPRESSION LABEL="" NAME="MATH" TYPE="INTEGER" URL="">
    <EXPRNODE NAME="TYPE" VALUE="STRING"/>
    <EXPRNODE NAME="OPERATOR" VALUE="CMP_SUBSTR"/>
    <EXPRESSION LABEL="" NAME="IDENTITY" TYPE="PROPERTY" URL="">
    <EXPRNODE NAME="PROP_NAME" VALUE="URL"/>   
     </EXPRESSION>
    <EXPRESSION LABEL="" NAME="CONST" TYPE="STRING" URL="">
    <EXPRNODE NAME="VALUE" VALUE="temp"/>
    </EXPRESSION>
    </EXPRESSION>
    <EXPRESSION LABEL="" NAME="REMOVE_RECORD" TYPE="VOID" URL=""/> 
    </EXPRESSION>
    </EXPRESSION>
    </EXPRESSION>

记录仍显示在索引中。帮助我了解我在哪里弄错了。为什么它不起作用?

【问题讨论】:

    标签: endeca


    【解决方案1】:

    如果你决定编写一个基于 CAS Java 的操纵器,你可以很容易地做到这一点。如果您在 CAS 安装阶段安装它们,则可以使用示例。

    在示例中,记录通过 mOutputChannel.output(record) 输出。

    您可以轻松地在删除情况下设置一个布尔值,然后该记录由操纵器的输出阶段传递。

    if (output_record)
    {
        mOutputChannel.output(record);
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-12
      • 1970-01-01
      • 2016-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-28
      相关资源
      最近更新 更多