ESQL - full text functions verifier tests refactor (#128775)
This commit is contained in:
parent
3f1e1b3c30
commit
dc3d515226
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"type": "text"
|
||||
},
|
||||
"body": {
|
||||
"type": "text"
|
||||
},
|
||||
"tags": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"category": {
|
||||
"type": "integer"
|
||||
},
|
||||
"published_date": {
|
||||
"type": "date"
|
||||
},
|
||||
"vector": {
|
||||
"type": "dense_vector",
|
||||
"similarity": "l2_norm"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -204,23 +204,7 @@ public abstract class FullTextFunction extends Function
|
|||
checkCommandsBeforeExpression(
|
||||
plan,
|
||||
condition,
|
||||
Match.class,
|
||||
lp -> (lp instanceof Limit == false) && (lp instanceof Aggregate == false),
|
||||
m -> "[" + m.functionName() + "] " + m.functionType(),
|
||||
failures
|
||||
);
|
||||
checkCommandsBeforeExpression(
|
||||
plan,
|
||||
condition,
|
||||
MultiMatch.class,
|
||||
lp -> (lp instanceof Limit == false) && (lp instanceof Aggregate == false),
|
||||
m -> "[" + m.functionName() + "] " + m.functionType(),
|
||||
failures
|
||||
);
|
||||
checkCommandsBeforeExpression(
|
||||
plan,
|
||||
condition,
|
||||
Term.class,
|
||||
FullTextFunction.class,
|
||||
lp -> (lp instanceof Limit == false) && (lp instanceof Aggregate == false),
|
||||
m -> "[" + m.functionName() + "] " + m.functionType(),
|
||||
failures
|
||||
|
|
|
@ -379,7 +379,7 @@ public class MultiMatch extends FullTextFunction implements OptionalArgument, Po
|
|||
private TypeResolution resolveFields() {
|
||||
return fields.stream()
|
||||
.map(
|
||||
(Expression field) -> isNotNull(field, sourceText(), FIRST).and(
|
||||
(Expression field) -> isNotNull(field, sourceText(), SECOND).and(
|
||||
isType(
|
||||
field,
|
||||
FIELD_DATA_TYPES::contains,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue