zhangstar333 commented on code in PR #67289:
URL: https://github.com/apache/doris/pull/67289#discussion_r3964401333
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/lance/source/LanceScanNode.java:
##########
@@ -321,12 +352,44 @@ private Optional<List<Split>>
createIndexSegmentSplits(LanceTableMetadata metada
return Optional.of(plan.buildSplits());
}
- private static List<LanceIndexSegmentInfo> selectIndexSegments(
- List<LanceIndexSegmentInfo> indexSegments, int vectorFieldId) {
+ private List<Split> createFullTextIndexSegmentSplits(LanceTableMetadata
metadata,
+ Map<Long, LanceFragmentInfo> visibleFragments) throws
UserException {
+ TFullTextSearchParams fullText =
+ externalSearchRequest.getSearchQuery().getFullTextSearch();
+ if (searchFieldId < 0) {
+ throw new UserException("Lance full-text column '" +
fullText.getColumn()
+ + "' has no field ID in the Lance schema");
+ }
+ List<LanceIndexSegmentInfo> matchingSegments =
selectFullTextIndexSegments(
+ metadata.getIndexSegments(), searchFieldId,
fullText.getColumn());
+ if (matchingSegments.isEmpty()) {
+ throw new UserException("No committed Lance FTS index exists for
column '"
+ + fullText.getColumn() + "' at dataset version " +
metadata.getVersion());
+ }
+ IndexSegmentSplitPlan plan = planIndexSegments(
+ metadata, matchingSegments, visibleFragments, true)
+ .orElseThrow(() -> new UserException("Lance FTS index for
column '"
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]