本文介绍了QueryOptionsBuilder弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://developer.marklogic.com/learn/java/analytics 上看到的

此时是否可以使用JavaAPI中的QueryOptionsBuilder进行多面搜索?还是在以后的某个发行版中使用了不推荐使用的类?

Is there an alternative to using QueryOptionsBuilder in the JavaAPI to do faceted searches at this time? Or are we stuck using a deprecated class until some future release?

谢谢!

推荐答案

是的,还有一种选择.您可以使用JSON或XML的形式发送或接收查询选项,而不必使用不推荐使用的构建器.

Yes, there is an alternative. You can send or receive query options as JSON or XML instead of using the deprecated builder.

为了扩展一点,QueryOptionsManager.writeOptions()方法接受任何实现QueryOptionsWriteHandle标记接口的类.除了QueryOptionsHandle类之外,实现类还包括JSON或XML的写句柄.

To expand a bit, the QueryOptionsManager.writeOptions() method accepts any class that implements the QueryOptionsWriteHandle marker interface. Besides the QueryOptionsHandle class, implementing classes include the write handles for JSON or XML.

类似地,readOptions()方法接受实现QueryOptionsReadHandle标记接口的类,其中包括JSON或XML的读取句柄.

Similarly, the readOptions() method accepts the classes that implement the QueryOptionsReadHandle marker interface, which include the read handles for JSON or XML.

  • http://docs.marklogic.com/javadoc/client/com/marklogic/client/admin/QueryOptionsManager.html
  • http://docs.marklogic.com/javadoc/client/com/marklogic/client/io/marker/QueryOptionsWriteHandle.html
  • http://docs.marklogic.com/javadoc/client/com/marklogic/client/io/marker/QueryOptionsReadHandle.html

这篇关于QueryOptionsBuilder弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 11:58