dsbiw2911188 2014-06-25 18:11
浏览 98
已采纳

PHP Solr PECL扩展支持字段更新

Based on information I found in this SO answer:

Update specific field on SOLR index

as of Solr 4.0, updating specific fields of a Solr document is possible via its HTTP API.

Looking on the PHP Solr PECL extension page here:

http://pecl.php.net/package/solr

seems to imply that Solr 4.0 feature support has been added. I looked through the documentation for the extension here:

http://www.php.net/manual/en/book.solr.php

and in particular the documentation for addDocument here:

http://www.php.net/manual/en/solrclient.adddocument.php

but it does not seem to indicate whether or not "overwriting" a document means deleting it and then adding the current document, or updating fields individually. There does not appear to be any methods specifically meant to update fields either.

Does anyone know if the extension has the capability of updating field values without deleting the document?

  • 写回答

1条回答 默认 最新

  • doujiang2812 2014-06-26 12:55
    关注

    There is nothing in the changelog indicating that the php_solr extension supports updating single fields (field updates has a few requirements for your schema as well). I'd say that it hasn't been a priority, as it's not much different from just submitting the document again (which your toolchain should be able to do).

    overwrite replaces allowDupsand two other settings related to the XML update messages in Solr4.0, but is not related to field level updates - just what action you want to take when the uniqueKey already exists in the index.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?