Improve search by under and linksTo feature.
sotous opened this issue · comments
Jesus Soto commented
Implement array recognition for both under
and linksTo
parameter inside searchOptions
. This will enable the backend to understand the client requests at a complete and more complicated search.
Back end request reception should be aimed at the following interface:
export declare enum Join {
inner = "INNER_JOIN",
full = "FULL_JOIN"
}
export interface JoinElement {
id: string;
negation?: boolean;
}
export interface SearchOptionsJoin {
type?: Join.inner | Join.full;
elements: JoinElement[];
}
export interface SearchOptions {
under?: SearchOptionsJoin;
linksTo?: SearchOptionsJoin;
text?: {
value: string;
levels?: number;
};
orderBy?: string;
pagination?: {
first: number;
offset: number;
};
}
Jesus Soto commented
Discussion about how to properly approach the INNER_JOIN
logic in this case through dgraph
inersections.
https://discuss.dgraph.io/t/finding-the-intersection-of-many-edges-from-node-a-within-node-b/13363
Jesus Soto commented
The above interface needs to be implemented in https://github.com/uprtcl/js-uprtcl