mirror of https://github.com/apache/lucene.git
LUCENE-1878: make it clear that contrib/spatial is still experimental
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@810951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a02eb9ee42
commit
ca16a35398
|
@ -28,6 +28,10 @@ import org.apache.lucene.spatial.tier.DistanceFilter;
|
|||
import org.apache.lucene.spatial.tier.DistanceUtils;
|
||||
|
||||
|
||||
/** <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
|
||||
public class GeoHashDistanceFilter extends DistanceFilter {
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* Based on http://en.wikipedia.org/wiki/Geohash
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class GeoHashUtils {
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@ package org.apache.lucene.spatial.geometry;
|
|||
* Represents lat/lngs as fixed point numbers translated so that all
|
||||
* world coordinates are in the first quadrant. The same fixed point
|
||||
* scale as is used for FixedLatLng is employed.
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class CartesianPoint {
|
||||
private int x;
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
|
||||
package org.apache.lucene.spatial.geometry;
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public enum DistanceUnits {
|
||||
MILES,
|
||||
KILOMETERS;
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
|
||||
package org.apache.lucene.spatial.geometry;
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class FixedLatLng extends LatLng {
|
||||
public static final double SCALE_FACTOR=1000000;
|
||||
public static final int SCALE_FACTOR_INT=1000000;
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
|
||||
package org.apache.lucene.spatial.geometry;
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class FloatLatLng extends LatLng {
|
||||
private double lat;
|
||||
private double lng;
|
||||
|
|
|
@ -23,7 +23,10 @@ package org.apache.lucene.spatial.geometry;
|
|||
* point based coordinates. Instances are immutable.
|
||||
*
|
||||
* @see FloatLatLng
|
||||
*
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public abstract class LatLng {
|
||||
|
||||
|
|
|
@ -19,6 +19,10 @@ package org.apache.lucene.spatial.geometry.shape;
|
|||
|
||||
/**
|
||||
* Imported from mq java client. No changes made.
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class DistanceApproximation
|
||||
{
|
||||
|
|
|
@ -20,6 +20,10 @@ package org.apache.lucene.spatial.geometry.shape;
|
|||
|
||||
/**
|
||||
* Ellipse shape. From C++ gl.
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class Ellipse implements Geometry2D {
|
||||
private Point2D center;
|
||||
|
|
|
@ -20,6 +20,10 @@ package org.apache.lucene.spatial.geometry.shape;
|
|||
|
||||
/**
|
||||
* Common set of operations available on 2d shapes.
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public interface Geometry2D {
|
||||
/**
|
||||
|
|
|
@ -17,6 +17,12 @@
|
|||
|
||||
package org.apache.lucene.spatial.geometry.shape;
|
||||
|
||||
/**
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public enum IntersectCase {
|
||||
WITHIN,
|
||||
CONTAINS,
|
||||
|
|
|
@ -24,6 +24,10 @@ import org.apache.lucene.spatial.geometry.LatLng;
|
|||
|
||||
/**
|
||||
* Lat-long rect. Instances are mutable.
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class LLRect {
|
||||
private LatLng ll, ur;
|
||||
|
|
|
@ -20,6 +20,10 @@ package org.apache.lucene.spatial.geometry.shape;
|
|||
|
||||
/**
|
||||
* 2d line segment.
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class LineSegment {
|
||||
public final Point2D A = new Point2D();
|
||||
|
|
|
@ -20,6 +20,10 @@ package org.apache.lucene.spatial.geometry.shape;
|
|||
|
||||
/**
|
||||
* Point class. This type is mutable.
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class Point2D {
|
||||
private double x;
|
||||
|
|
|
@ -20,6 +20,10 @@ package org.apache.lucene.spatial.geometry.shape;
|
|||
|
||||
/**
|
||||
* Rectangle shape.
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class Rectangle implements Geometry2D {
|
||||
private Point2D ptMin, ptMax;
|
||||
|
|
|
@ -20,6 +20,10 @@ package org.apache.lucene.spatial.geometry.shape;
|
|||
|
||||
/**
|
||||
* 2D vector
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class Vector2D {
|
||||
private double x;
|
||||
|
|
|
@ -29,7 +29,9 @@ import org.apache.lucene.spatial.tier.projections.SinusoidalProjector;
|
|||
|
||||
|
||||
/**
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class CartesianPolyFilterBuilder {
|
||||
|
||||
|
|
|
@ -28,6 +28,11 @@ import org.apache.lucene.search.DocIdSet;
|
|||
import org.apache.lucene.util.NumericUtils;
|
||||
import org.apache.lucene.util.OpenBitSet;
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class CartesianShapeFilter extends Filter {
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,6 +24,11 @@ import org.apache.lucene.search.Filter;
|
|||
import org.apache.lucene.search.FieldComparator;
|
||||
import org.apache.lucene.search.FieldComparatorSource;
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class DistanceFieldComparatorSource extends FieldComparatorSource {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -23,6 +23,11 @@ import java.util.HashMap;
|
|||
import org.apache.lucene.search.Filter;
|
||||
import org.apache.lucene.spatial.tier.DistanceHandler.Precision;
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public abstract class DistanceFilter extends Filter {
|
||||
|
||||
final protected Filter startingFilter;
|
||||
|
|
|
@ -24,6 +24,9 @@ import java.util.Map;
|
|||
* Provide a high level access point to distances
|
||||
* Used by DistanceSortSource and DistanceQuery
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*
|
||||
*/
|
||||
public class DistanceHandler {
|
||||
|
|
|
@ -24,7 +24,11 @@ import org.apache.lucene.search.QueryWrapperFilter;
|
|||
import org.apache.lucene.spatial.geohash.GeoHashDistanceFilter;
|
||||
import org.apache.lucene.misc.ChainedFilter;
|
||||
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class DistanceQueryBuilder {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -23,7 +23,11 @@ import org.apache.lucene.spatial.geometry.LatLng;
|
|||
import org.apache.lucene.spatial.geometry.shape.LLRect;
|
||||
import org.apache.lucene.spatial.geometry.shape.Rectangle;
|
||||
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class DistanceUtils {
|
||||
|
||||
static DistanceUtils instance = new DistanceUtils();
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
|
||||
package org.apache.lucene.spatial.tier;
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class InvalidGeoException extends Exception {
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,6 +25,11 @@ import org.apache.lucene.search.Filter;
|
|||
import org.apache.lucene.search.DocIdSet;
|
||||
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class LatLongDistanceFilter extends DistanceFilter {
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,7 +21,9 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class Shape {
|
||||
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
package org.apache.lucene.spatial.tier.projections;
|
||||
|
||||
/**
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class CartesianTierPlotter {
|
||||
public static final String DEFALT_FIELD_PREFIX = "_tier_";
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
|
||||
package org.apache.lucene.spatial.tier.projections;
|
||||
|
||||
/**
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public interface IProjector {
|
||||
public String coordsAsString(double latitude, double longitude);
|
||||
public double[] coords(double latitude, double longitude);
|
||||
|
|
|
@ -20,7 +20,10 @@ package org.apache.lucene.spatial.tier.projections;
|
|||
/**
|
||||
* Based on Sinusoidal Projections
|
||||
* Project a latitude / longitude on a 2D cartisian map
|
||||
*
|
||||
*
|
||||
* <p><font color="red"><b>NOTE:</b> This API is still in
|
||||
* flux and might change in incompatible ways in the next
|
||||
* release.</font>
|
||||
*/
|
||||
public class SinusoidalProjector implements IProjector {
|
||||
|
||||
|
|
|
@ -17,10 +17,31 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>
|
||||
spatial
|
||||
Geographical filtering & sorting with Lucene
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
spatial
|
||||
|
||||
<p>This package makes it possible to filter and sort according to
|
||||
geographical constraints. For example, filter to include only
|
||||
restaurants within 2 miles of a specified latitude/longitude, sorting
|
||||
by distance ascending.</p>
|
||||
|
||||
<p>See <a href="http://www.nsshutdown.com/projects/lucene/whitepaper/locallucene_v2.html">here</a>
|
||||
for details on the technical approach.</p>
|
||||
|
||||
<p>Unfortunately, this package is still very new, and has little to no
|
||||
documentation. It's best to ask for pointers on
|
||||
java-user@lucene.apache.org, and look at the unit tests included in
|
||||
the source distribution.</p>
|
||||
|
||||
<p>There are also known issues, eg at
|
||||
least <a href="https://issues.apache.org/jira/browse/LUCENE-1815">LUCENE-1781</a>
|
||||
and <a href="https://issues.apache.org/jira/browse/LUCENE-1815">LUCENE-1815</a>.</p>
|
||||
|
||||
<p><font color="red"><b>NOTE:</b> This package is still in flux and
|
||||
might change in incompatible ways in the next release.</font>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
|
|
Loading…
Reference in New Issue