-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add a RawCtsQueryDefinition to parallel RawCombinedQueryDefinition and RawStructuredQueryDefinition #720
Comments
Here's an example work-around that works fine in 4.0.1: import com.marklogic.client.DatabaseClient;
import com.marklogic.client.DatabaseClientFactory;
import com.marklogic.client.DatabaseClientFactory.DigestAuthContext;
import com.marklogic.client.io.Format;
import com.marklogic.client.io.StringHandle;
import com.marklogic.client.query.QueryManager;
import com.marklogic.client.query.RawQueryDefinition;
public class CtsQueryTest {
public static void main(String[] args) {
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.wire", "debug");
DatabaseClient client = DatabaseClientFactory.newClient("localhost", 8000, new DigestAuthContext("admin", "admin"));
QueryManager queryMgr = client.newQueryManager();
RawQueryDefinition query = queryMgr.newRawCombinedQueryDefinitionAs(Format.XML,
"<cts:word-query xmlns:cts=\"http://marklogic.com/cts\">" +
" <cts:text>someSearchTerm</cts:text>" +
"</cts:word-query>");
StringHandle results = queryMgr.search(query, new StringHandle());
System.out.println(results.get());
}
} |
sammefford
added a commit
that referenced
this issue
May 9, 2017
…finition and RawStructuredQueryDefinition
Here are the API changes:
Add CtsQueryWriteHandle marker interface to these classes:
|
Values query support is in now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like you currently can use QueryManager.newCombinedQueryDefinition or newStructuredQueryDefinition and pass in a raw serialized cts query. But it's confusing to do a raw cts query that way. Therefore I propose we add RawCtsQueryDefinition and have it extend RawQueryDefinition and work just like RawCombinedQueryDefinition and RawStructuredQueryDefinition.
The text was updated successfully, but these errors were encountered: