Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Namespace Lucene.Net.Spatial.Vector

    Spatial strategy that uses two fields.

    Classes

    DistanceValueSource

    An implementation of the Lucene Lucene.Net.Queries.Function.ValueSource model that returns the distance for a PointVectorStrategy.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    PointVectorStrategy

    Simple SpatialStrategy which represents Points in two numeric Lucene.Net.Documents.DoubleFields. The Strategy's best feature is decent distance sort.

    Characteristics:

    • Only indexes points; just one per field value.
    • Can query by a rectangle or circle.
    • Intersects and IsWithin is supported.
    • Uses the FieldCache for MakeDistanceValueSource(IPoint) and for searching with a Circle.

    Implementation:

    This is a simple Strategy. Search works with Lucene.Net.Search.NumericRangeQuerys on an x & y pair of fields. A Circle query does the same bbox query but adds a ValueSource filter on MakeDistanceValueSource(IPoint).

    One performance shortcoming with this strategy is that a scenario involving both a search using a Circle and sort will result in calculations for the spatial distance being done twice -- once for the filter and second for the sort.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    • Improve this Doc
    Back to top Copyright © 2022 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.