Package org.saidone.restless.client
Class SearchServiceClient
java.lang.Object
org.saidone.restless.client.SearchServiceClient
Client of the platform's search service, supporting AFTS, CMIS, pagination and ordered AFTS sort fields.
Each call sends the shared provider's Alfresco ticket and a per-call deadline. Unary calls retry once after UNAUTHENTICATED if the provider supplies a different ticket. The caller owns the channel and should share one TicketProvider across service clients.
-
Constructor Summary
ConstructorsConstructorDescriptionSearchServiceClient(io.grpc.Channel channel, TicketProvider tickets, Duration deadline) Creates this service client with shared authentication and a per-call deadline.SearchServiceClient(org.saidone.restless.api.SearchServiceGrpc.SearchServiceBlockingStub stub, TicketProvider tickets, Duration deadline) Creates this service client with shared authentication and a per-call deadline. -
Method Summary
Modifier and TypeMethodDescriptionorg.saidone.restless.api.SearchResponseRuns an AFTS or CMIS query returning name, type, properties and node_ref.org.saidone.restless.api.SearchResponsequery(String query, String language, int skipCount, int maxItems, List<org.saidone.restless.api.SortField> sort) Runs an AFTS or CMIS query returning name, type, properties and node_ref.org.saidone.restless.api.SearchResponsequery(String query, String language, int skipCount, int maxItems, List<org.saidone.restless.api.SortField> sort, com.google.protobuf.FieldMask fields) Queries projected nodes; existing overloads select name, type and properties by default.org.saidone.restless.api.SearchResponsequery(String query, String language, int skipCount, int maxItems, List<org.saidone.restless.api.SortField> sort, com.google.protobuf.FieldMask fields, boolean includeScores) Queries projected nodes and optionally returns relevance scores in entry order.
-
Constructor Details
-
SearchServiceClient
Creates this service client with shared authentication and a per-call deadline.The caller retains ownership of the channel; closing an application should close its shared channel once.
- Parameters:
channel- shared gRPC channel; ownership remains with the callertickets- shared ticket provider, normally one AuthenticationServiceClientdeadline- per-call deadline applied to every RPC attempt
-
SearchServiceClient
public SearchServiceClient(org.saidone.restless.api.SearchServiceGrpc.SearchServiceBlockingStub stub, TicketProvider tickets, Duration deadline) Creates this service client with shared authentication and a per-call deadline.The caller retains ownership of the channel; closing an application should close its shared channel once.
- Parameters:
stub- preconfigured stub for this repository servicetickets- shared ticket provider, normally one AuthenticationServiceClientdeadline- per-call deadline applied to every RPC attempt
-
-
Method Details
-
query
public org.saidone.restless.api.SearchResponse query(String query, String language, int skipCount, int maxItems) Runs an AFTS or CMIS query returning name, type, properties and node_ref. Use the fields overload with * for complete snapshots.- Parameters:
query- repository query textlanguage- afts or cmis; an empty value selects aftsskipCount- non-negative number of entries to skipmaxItems- page size in 1..1000; zero selects the server default- Returns:
- the result page, total count and continuation flag
-
query
public org.saidone.restless.api.SearchResponse query(String query, String language, int skipCount, int maxItems, List<org.saidone.restless.api.SortField> sort) Runs an AFTS or CMIS query returning name, type, properties and node_ref. Use the fields overload with * for complete snapshots.- Parameters:
query- repository query textlanguage- afts or cmis; an empty value selects aftsskipCount- non-negative number of entries to skipmaxItems- page size in 1..1000; zero selects the server defaultsort- ordered AFTS sort fields; CMIS queries use ORDER BY instead- Returns:
- the result page, total count and continuation flag
-
query
public org.saidone.restless.api.SearchResponse query(String query, String language, int skipCount, int maxItems, List<org.saidone.restless.api.SortField> sort, com.google.protobuf.FieldMask fields) Queries projected nodes; existing overloads select name, type and properties by default. Selection does not change permission filtering, sorting or totals. Older servers ignore the selection and return full nodes.- Parameters:
query- repository query textlanguage- afts or cmis; empty selects aftsskipCount- non-negative page offsetmaxItems- page size in 1..1000; zero selects the defaultsort- ordered AFTS sort fields; CMIS uses ORDER BYfields- Node field paths; empty selects node_ref only, a single * selects the complete node- Returns:
- the page with selected fields; node_ref is always included
-
query
public org.saidone.restless.api.SearchResponse query(String query, String language, int skipCount, int maxItems, List<org.saidone.restless.api.SortField> sort, com.google.protobuf.FieldMask fields, boolean includeScores) Queries projected nodes and optionally returns relevance scores in entry order. Deleted indexed hits are omitted from both lists. The total still reflects the search engine's count.- Parameters:
query- repository query textlanguage-aftsorcmis; empty selects AFTSskipCount- non-negative page offsetmaxItems- page size from 1 to 1000; zero selects the server defaultsort- ordered AFTS sort fields; CMIS usesORDER BYfields- node field mask; empty selects references onlyincludeScores- whether to request scores from the server- Returns:
- the page, continuation and total, plus scores when available and requested
-