如何在单独的搜索链中使用 vespa.ai 中的多个文档处理器?
How to use multiple document processor in vespa.ai in separate search chain?
我需要在我的 vespa 用例中使用多个文档处理器。
我有一个条件,我需要根据不同的条件修改提要。
我无法使用文档处理器链接。它必须是一个单独的,我每次插入提要时都可以使用。
我尝试使用以下 server.xml 配置。
<document-processing>
<chain id="foo">
<documentprocessor
id="com.abc.xyz.Test" bundle="abc-xyz-one" />
</chain>
<chain id="bar">
<documentprocessor
id="com.abc.xyz.Test2" bundle="abc-xyz-one" />
</chain>
</document-processing>
要求
http://<IP>:<port>/document/v1/test2/test2/docid/<id>/;&chain=foo
这里我超时了。
要添加多个文档处理器,请使用
<document-processing>
<chain id="default">
<documentprocessor id="com.abc.xyz.Test" bundle="abc-xyz-one" />
<documentprocessor id="com.abc.xyz.Test2" bundle="abc-xyz-one" />
</chain>
</document-processing>
(我认为你不想在这里但是如果你需要多个链,你需要配置路由。这是因为你通常希望根据操作属性路由到处理链,而不是留给客户端.)
/document/v1httpapi(此处描述https://docs.vespa.ai/documentation/document-api.html)不支持链参数。它有一个 'route' 参数,允许您通过路由发送消息,其中路由上的跃点可以是 docproc 链。
不清楚你真正想做什么,但你可以通过每个链有一个路由来将文档操作路由到不同的文档处理链(然后发送到哪个路由的条件需要在 Vespa 之外解决),参见 https://docs.vespa.ai/documentation/routing.html。 vespa-route 命令实用程序非常方便地找出跃点名称是什么。
我需要在我的 vespa 用例中使用多个文档处理器。 我有一个条件,我需要根据不同的条件修改提要。 我无法使用文档处理器链接。它必须是一个单独的,我每次插入提要时都可以使用。 我尝试使用以下 server.xml 配置。
<document-processing>
<chain id="foo">
<documentprocessor
id="com.abc.xyz.Test" bundle="abc-xyz-one" />
</chain>
<chain id="bar">
<documentprocessor
id="com.abc.xyz.Test2" bundle="abc-xyz-one" />
</chain>
</document-processing>
要求
http://<IP>:<port>/document/v1/test2/test2/docid/<id>/;&chain=foo
这里我超时了。
要添加多个文档处理器,请使用
<document-processing>
<chain id="default">
<documentprocessor id="com.abc.xyz.Test" bundle="abc-xyz-one" />
<documentprocessor id="com.abc.xyz.Test2" bundle="abc-xyz-one" />
</chain>
</document-processing>
(我认为你不想在这里但是如果你需要多个链,你需要配置路由。这是因为你通常希望根据操作属性路由到处理链,而不是留给客户端.)
/document/v1httpapi(此处描述https://docs.vespa.ai/documentation/document-api.html)不支持链参数。它有一个 'route' 参数,允许您通过路由发送消息,其中路由上的跃点可以是 docproc 链。
不清楚你真正想做什么,但你可以通过每个链有一个路由来将文档操作路由到不同的文档处理链(然后发送到哪个路由的条件需要在 Vespa 之外解决),参见 https://docs.vespa.ai/documentation/routing.html。 vespa-route 命令实用程序非常方便地找出跃点名称是什么。