Closed cristianmtr closed 3 years ago
This is due to not having a Ranker
or SortQL
after the Chunk2DocRanker
most likely?
I wonder, whether the ranker itself should not be able to have a order
keyword. While it is true, that SortQL
can do the job, already sorting in the right (configurable) order in the Chunk2DocRanker
might be useful.
great catch!
The ranker Chunk2DocRanker
only cares about assigning the score
to the match but not reordering it. I think we need to add an SortQL
as the last driver in the doc.yml
for SearchRequest
to sort by desceding score.
I wonder, whether the ranker itself should not be able to have a
order
keyword. While it is true, thatSortQL
can do the job, already sorting in the right (configurable) order in theChunk2DocRanker
might be useful.
Well, it would be in the driver
.
Here is the root issue. The SortQL
driver attached to the Chunk2DocRanker
by default is not setting reverse
argument.
https://github.com/jina-ai/jina/blob/master/jina/resources/executors.requests.BaseRanker.yml#L9
Here is the root issue. The
SortQL
driver attached to theChunk2DocRanker
by default is not settingreverse
argument. https://github.com/jina-ai/jina/blob/master/jina/resources/executors.requests.BaseRanker.yml#L9
In this case I am not sure it is even applied because I think we override the drivers. And if we do so the default ones are not considered right?
Here is the root issue. The
SortQL
driver attached to theChunk2DocRanker
by default is not settingreverse
argument. https://github.com/jina-ai/jina/blob/master/jina/resources/executors.requests.BaseRanker.yml#L9In this case I am not sure it is even applied because I think we override the drivers. And if we do so the default ones are not considered right?
u r right. Adding a SortQL
to the pods/ranker.yml
will solve the problem in the multilyric example. However, we need to offer the option in the Chunk2DocRankDriver
because by default it is ranking in ascending order and do splicing. When the user considering the large score the better, this will cause trouble.
Here is the root issue. The
SortQL
driver attached to theChunk2DocRanker
by default is not settingreverse
argument. https://github.com/jina-ai/jina/blob/master/jina/resources/executors.requests.BaseRanker.yml#L9In this case I am not sure it is even applied because I think we override the drivers. And if we do so the default ones are not considered right?
u r right. Adding a
SortQL
to thepods/ranker.yml
will solve the problem in the multilyric example. However, we need to offer the option in theChunk2DocRankDriver
because by default it is ranking in ascending order and do splicing. When the user considering the large score the better, this will cause trouble.
I agree but offering this solution kind of invalidates the use of SortQL as default attached driver right? Nothing against it, just raising the point
simply use SortQL
From a discussion with @JoanFM , it seems like there is a bit of confusion around the score
field.
distance
. Thus, smaller is betterchunks
) it means similarity
. Or at least, in the context of MinRanker
(https://github.com/jina-ai/jina-hub/blob/f92276c1c4a38ef9ac34a16c4065b5d360805600/rankers/MinRanker/__init__.py#L12), larger is better. Thus there is nothing wrong with the output of the example above.
The problem, to me, is a matter of documentation / conflicting definitions for the score
field.
Possible solutions:
match
and list of chunk
that represents the method use to generate the score
field. Something like
"method": "MinRanker" # or "Indexer
in the output
Will close this, as original problem was not the problem. Have opened a new issue to clarify meaning of 'score' https://github.com/jina-ai/jina/issues/1255
Describe your problem
When working on the multires-lyrics-example I noticed that the sorting differs between
chunks
andmatches
in the output from the search.Chunks are sorted in ascending order, matches are sorted in descending order.
Is this intended? See screenshot below
What is your guess?
Not really sure if this is intended or not, but if this is indeed labeled as an issue, I can try to dig
Environment
Screenshots
Left: matches Right: chunks