Closed cblnco closed 1 year ago
Makes sense. This needs a new type definition that extends the IndexableDocument. Are you willing to create a PR?
Yes, I'm willing to. I was thinking that we can have a new interface like so:
export interface QetaDocument extends IndexableDocument {
docType: string;
author: string;
score: number;
answerCount?: number;
}
And then QetaCollatorFactory
would return AsyncGenerator<QetaDocument>
.
What do you think @drodil?
All right, thanks @drodil. I have made the following PR: #79 so we can close this Issue.
There are a few values in the current qeta search document. I think it could be helpful to have a document that is a bit more descriptive so we can have more information available in the client side.
We could include a
docType
value to identify document type individually,author
,answersCount
andscore
. The result example of this document would look like this:In my team we take advantage of the
docType
value with Backstage's Search API to have buckets of documents bydocType
. This could be something that could be helpful for other customers when making queries with the search API.In the client side this could be leveraged to show more details to users:
I would like to know your thoughts on this suggestion @drodil.