Вопрос

As seen on http://developer.marklogic.com/learn/java/analytics, you are able to do faceted searches with the JavaAPI. However, the examples on that page use QueryOptionsBuilder, which has been deprecated.

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?

Thanks!

Это было полезно?

Решение

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

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.

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top