简体   繁体   English

如何指定要从 Gentics Mesh(无 graphQL API)查询的模式(或索引)

[英]How can I specify what schemas ( or indices ) I want to query from Gentics Mesh (no graphQL API)

So I'm using Gentics Mesh and a "middleware".所以我使用 Gentics Mesh 和“中间件”。 From this middleware, I'm making a request to the mesh API that forwards requests to elasticSearch .从这个中间件,我向mesh API 发出请求,该 API 将请求转发到elasticSearch At moment I don't want to use GraphQL API so that's why I'm using /rawSearch .目前我不想使用 GraphQL API,所以这就是我使用/rawSearch的原因。 The problem becomes that in such query it will query all indices and I would like to decide which one it queries, just like elasticSearch does, for example, /index1,index2/_search.问题是,在这样的查询中,它将查询所有索引,我想决定查询哪个索引,就像elasticSearch一样,例如, /index1,index2/_search. Is it possible to limit the search to specific indexes or am I forced to use GraphQL?是否可以将搜索限制为特定索引,或者我是否被迫使用 GraphQL?

It is not possible to provide the exact index name yourself.自己无法提供确切的索引名称。

Maybe it useful for your use case to use the /api/v2/:projectName/rawSearch which narrows the indices down to a certain project within mesh.也许使用/api/v2/:projectName/rawSearch将索引缩小到网格中的某个项目对您的用例很有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM