A boolean ValueSource that compares a shape from a provided ValueSource with a given Shape and sees if it matches a given SpatialOperation (the predicate). @lucene.experimental
Inheritance: ValueSource
Example #1
0
 public BoolDocValuesAnonymousClass(ShapePredicateValueSource outerInstance, FunctionValues shapeValues)
     : base(outerInstance)
 {
     // LUCENENET specific - added guard clauses
     this.outerInstance = outerInstance ?? throw new ArgumentNullException(nameof(outerInstance));
     this.shapeValues   = shapeValues ?? throw new ArgumentNullException(nameof(shapeValues));
 }
Example #2
0
        public override bool Equals(object?o)
        {
            if (this == o)
            {
                return(true);
            }
            if (o is null || GetType() != o.GetType())
            {
                return(false);
            }

            ShapePredicateValueSource that = (ShapePredicateValueSource)o;

            if (!shapeValueSource.Equals(that.shapeValueSource))
            {
                return(false);
            }
            if (!op.Equals(that.op))
            {
                return(false);
            }
            if (!queryShape.Equals(that.queryShape))
            {
                return(false);
            }

            return(true);
        }
Example #3
0
 /// <summary>
 /// Returns a <see cref="Filter"/> that should be used with <see cref="FilteredQuery.QUERY_FIRST_FILTER_STRATEGY"/>.
 /// Use in another manner is likely to result in an <see cref="NotSupportedException"/>
 /// to prevent misuse because the filter can't efficiently work via iteration.
 /// </summary>
 public override Filter MakeFilter(SpatialArgs args)
 {
     ValueSource shapeValueSource = MakeShapeValueSource();
     ShapePredicateValueSource predicateValueSource = new ShapePredicateValueSource(
         shapeValueSource, args.Operation, args.Shape);
     return new PredicateValueSourceFilter(predicateValueSource);
 }
 public BoolDocValuesAnonymousClass(ShapePredicateValueSource outerInstance, FunctionValues shapeValues)
     : base(outerInstance)
 {
     this.outerInstance = outerInstance;
     this.shapeValues   = shapeValues;
 }
 public BoolDocValuesAnonymousHelper(ShapePredicateValueSource outerInstance, FunctionValues shapeValues)
     : base(outerInstance)
 {
     this.outerInstance = outerInstance;
     this.shapeValues = shapeValues;
 }