HSEARCH-1242 #373

Merged
merged 4 commits into from Jan 11, 2013

Projects

None yet

2 participants

Owner
Sanne commented Jan 11, 2013

https://hibernate.onjira.com/browse/HSEARCH-1242

This is about simplifying usage of the @Spatial annotation for those cases in which the Coordinates name is not specified.

Not much changed in the docs yet as there is a specific issue for that.

@hferentschik hferentschik commented on the diff Jan 11, 2013
...ernate/search/engine/spi/AbstractDocumentBuilder.java
@@ -106,6 +106,12 @@
* @author Sanne Grinovero
*/
public abstract class AbstractDocumentBuilder<T> {
+
+ /**
+ * Prefix used to generate field names for a default {@link Spatial} annotation
+ */
+ public static final String COORDINATES_DEFAULT_FIELD = "_hibernate_default_coordinates";
hferentschik
hferentschik Jan 11, 2013 Owner

Should we not use something along the lines: __HSearch_Default_Coordinates to align with the names we have in ProjectionConstants?

Sanne
Sanne Jan 11, 2013 Owner

You mean for the constant field name or it's value?
But you can't project this as it's just a prefix.

hferentschik
hferentschik Jan 11, 2013 Owner

The field name. I know you cannot project on it, but I think it would be nice if generate field names are somehow aligned. Looks nicer and is more consistent when I look at the index/docment

@hferentschik hferentschik commented on the diff Jan 11, 2013
...ernate/search/engine/spi/AbstractDocumentBuilder.java
@@ -106,6 +106,12 @@
* @author Sanne Grinovero
*/
public abstract class AbstractDocumentBuilder<T> {
+
+ /**
+ * Prefix used to generate field names for a default {@link Spatial} annotation
+ */
+ public static final String COORDINATES_DEFAULT_FIELD = "_hibernate_default_coordinates";
+
private static final Log log = LoggerFactory.make();
hferentschik
hferentschik Jan 11, 2013 Owner

And there is a typo in one of the other variables:

protected final InstanceInitializer instanceInitalizer;

instanceInit_i_alizer

Sanne
Sanne Jan 11, 2013 Owner

Are you X-raying the project ? :D .. fixing.

@hferentschik hferentschik and 1 other commented on an outdated diff Jan 11, 2013
...va/org/hibernate/search/query/dsl/SpatialContext.java
/**
+ * @experimental This API will likely change
hferentschik
hferentschik Jan 11, 2013 Owner

do we really use 'likely' in this case? Would 'can' not be better?

Sanne
Sanne Jan 11, 2013 Owner

changing to

@experimental This API might change in minor versions

ok?

Owner
Sanne commented Jan 11, 2013

@hferentschik re-pushed

@hferentschik hferentschik commented on the diff Jan 11, 2013
...va/org/hibernate/search/query/dsl/SpatialContext.java
/**
+ * @experimental This API might change in minor versions
@hferentschik hferentschik merged commit 093ea34 into hibernate:master Jan 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment