Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

HSEARCH-1242 Spatial examples on SimpleHotel should mention Hotel

  • Loading branch information...
commit 99640ed2f765b142113b3bd5b25531387d45e7eb 1 parent ebbb3f3
@Sanne Sanne authored
View
16 hibernate-search-documentation/src/main/docbook/en-US/modules/spatial.xml
@@ -160,14 +160,14 @@
</itemizedlist>
<example>
- <title>SimpleHotel class sample</title>
+ <title>Hotel class sample</title>
<programlisting language="JAVA" role="JAVA">import org.hibernate.search.annotations.*;
@Entity
@Indexed
@Spatial
-public class SimpleHotel {
+public class Hotel {
@Latitude
Double latitude
@@ -196,27 +196,27 @@ public class SimpleHotel {
</itemizedlist>
<example>
- <title>SimpleHotel class sample</title>
+ <title>Hotel class sample</title>
<programlisting language="JAVA" role="JAVA">final QueryBuilder builder = fullTextSession.getSearchFactory()
- .buildQueryBuilder().forEntity( SimpleHotel.class ).get();
+ .buildQueryBuilder().forEntity( Hotel.class ).get();
org.apache.lucene.search.Query luceneQuery = builder.spatial()
- .onCoordinates( SimpleHotel.class.getName() )
+ .onDefaultCoordinates()
.within( radius, Unit.KM )
.ofLatitude( centerLatitude )
.andLongitude( centerLongitude )
.createQuery();
org.hibernate.Query hibQuery = fullTextSession.createFullTextQuery( luceneQuery,
- SimpleHotel.class );
+ Hotel.class );
List results = hibQuery.list();</programlisting>
</example>
<para>A fully working example can be found in the source code, in the
testsuite. See
- <methodname>SpatialIndexingTest.testSimpleSpatialAnnotationOnClassLevel()</methodname>
- and in <classname>SimpleHotel</classname> class.</para>
+ <methodname>SpatialIndexingTest.testSpatialAnnotationOnClassLevel()</methodname>
+ and in <classname>Hotel</classname> class.</para>
</section>
<section id="spatial-two-stages-quad-tree">
Please sign in to comment.
Something went wrong with that request. Please try again.