0c09481374
The LatLonShape field and LatLonShape query classes added the ability to index and search geospatial geometries in the WGS-84 latitude, longitude coordinate reference system. The foundation for this capability is provided by the Tessellator that converts an array of vertices describing a Point Line or Polygon into a stream of 3 vertex triangles that are encoded as a seven dimension point and indexed using the BKD POINT structure. A nice property of the Tessellator is that lat, lon restrictions are artificial and really only bound by the API. This commit builds on top of / abstracts the Tessellator LatLonShape and LatLonShapeQuery classes to provide the ability to index & search general cartesian (non WGS84 lat,lon restricted) geometry. It does so by introducing two new base classes: ShapeField and ShapeQuery that provide the indexing and search foundation for LatLonShape and the LatLonShape derived query classes (LatLonShapeBoundingBoxQuery, LatLonShapeLineQuery, LatLonShapePolygonQuery) and introducing a new XYShape factory class along with XYShape derived query classes (XYShapeBoundingBoxQuery, XYShapeLineQuery, XYShapePolygonQuery). The heart of the cartesian indexing is achieved through XYShapeEncodingUtils that converts the double precision vertices into an integer encoded seven dimension point (similar to LatLonShape). The test framework is also further abstracted and extended to provide a full test suite for the new XYShape capability that works the same way as the LatLonShape test suite (but applied to non GIS geometries). |
||
---|---|---|
.github | ||
dev-tools | ||
lucene | ||
solr | ||
.gitignore | ||
.hgignore | ||
README.md | ||
build.xml |
README.md
Apache Lucene and Solr
Apache Lucene is a high-performance, full featured text search engine library written in Java.
Apache Solr is an enterprise search platform written using Apache Lucene. Major features include full-text search, index replication and sharding, and result faceting and highlighting.
Online Documentation
This README file only contains basic setup instructions. For more comprehensive documentation, visit:
Building Lucene/Solr
(You do not need to do this if you downloaded a pre-built package.)
Lucene and Solr are built using Apache Ant. To build Lucene and Solr, run:
ant compile
If you see an error about Ivy missing while invoking Ant (e.g., .ant/lib does not exist
), run ant ivy-bootstrap
and retry.
Sometimes you may face issues with Ivy (e.g., an incompletely downloaded artifact). Cleaning up the Ivy cache and retrying is a workaround for most of such issues:
rm -rf ~/.ivy2/cache
The Solr server can then be packaged and prepared for startup by running the
following command from the solr/
directory:
ant server
Running Solr
After building Solr, the server can be started using
the bin/solr
control scripts. Solr can be run in either standalone or
distributed (SolrCloud mode).
To run Solr in standalone mode, run the following command from the solr/
directory:
bin/solr start
To run Solr in SolrCloud mode, run the following command from the solr/
directory:
bin/solr start -c
The bin/solr
control script allows heavy modification of the started Solr.
Common options are described in some detail in solr/README.txt. For an
exhaustive treatment of options, run bin/solr start -h
from the solr/
directory.
Development/IDEs
Ant can be used to generate project files compatible with most common IDEs. Run the ant command corresponding to your IDE of choice before attempting to import Lucene/Solr.
- Eclipse -
ant eclipse
(See this for details) - IntelliJ -
ant idea
(See this for details) - Netbeans -
ant netbeans
(See this for details)
Running Tests
The standard test suite can be run with the command:
ant test
Like Solr itself, the test-running can be customized or tailored in a number or ways. For an exhaustive discussion of the options available, run:
ant test-help
Contributing
Please review the Contributing to Solr Guide for information on contributing.
Discussion and Support
- Users Mailing List
- Developers Mailing List
- Lucene Issue Tracker
- Solr Issue Tracker
- IRC:
#solr
and#solr-dev
on freenode.net