Skip to content

Add CtsQueryBuilder for search in Java API #1260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
llinggit opened this issue Oct 9, 2020 · 0 comments
Closed

Add CtsQueryBuilder for search in Java API #1260

llinggit opened this issue Oct 9, 2020 · 0 comments

Comments

@llinggit
Copy link
Contributor

llinggit commented Oct 9, 2020

Link to the task in Jira: https://project.marklogic.com/jira/browse/JAVA-196

Copy of description in the task:

"Currently, the Java API provides the StructuredQueryBuilder class to make search easy.

StructuredQueryBuilder, however, generates structured queries for the Search API. The Search API is both inefficient (because the structured queries have to be transformed to cts.query on the server) and limited (because structured queries expose only a subset of the cts.query constructors).

The Java API also provides support for building a cts.query in the PlanBuilder for the Optic API. Currently, however, this builder cannot be used for search because the queries are serialized using the Optic functional AST. The Optic functional AST makes it possible to declare expressions that yield inputs to the cts.query constructors. The /v1/search endpoint, however, doesn't understand the Optic functional AST.

This improvement enhances the Java API with a cts.query builder to make search easy. See also:
#376
The existing com.marklogic.client.query package adds two new interfaces and an abstract class."

So we can address your issue, please include the following:

Version of MarkLogic Java Client API

See Readme.txt

Version of MarkLogic Server

See admin gui on port 8001 or run xdmp:version() in Query Console - port 8000)

Java version

Run java -version

OS and version

For MAC, run sw_vers.
For Windows, run systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
For Linux, run cat /etc/os-release and uname -r

Input: Some code to illustrate the problem, preferably in a state that can be independently reproduced on our end

Actual output: What did you observe? What errors did you see? Can you attach the logs? (Java logs, MarkLogic logs)

Expected output: What specifically did you expect to happen?

Alternatives: What else have you tried, actual/expected?

@llinggit llinggit self-assigned this Oct 9, 2020
@llinggit llinggit added this to the 5.3.0 milestone Oct 9, 2020
llinggit pushed a commit to llinggit/java-client-api that referenced this issue Oct 9, 2020
@llinggit llinggit modified the milestones: 5.3.0, N/A, java-client-api-NEXT Oct 9, 2020
llinggit pushed a commit to llinggit/java-client-api that referenced this issue Oct 15, 2020
llinggit pushed a commit to llinggit/java-client-api that referenced this issue Oct 15, 2020
llinggit pushed a commit that referenced this issue Oct 15, 2020
@llinggit llinggit assigned georgeajit and unassigned llinggit Oct 15, 2020
@llinggit llinggit added test and removed fix labels Oct 15, 2020
@georgeajit georgeajit added ship and removed test labels Oct 28, 2020
@georgeajit georgeajit removed this from the java-client-api-NEXT milestone Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants