Here is more detail about the bean class:
Code:
@Spatial(spatialMode = SpatialMode.GRID, name="location")
@Indexed(index = "ProductArticle")
@Analyzer(impl = org.apache.lucene.analysis.standard.StandardAnalyzer.class)
@AnalyzerDef(name = "customanalyzer", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),
filters = {@TokenFilterDef(factory = LowerCaseFilterFactory.class),
@TokenFilterDef(factory = SnowballPorterFilterFactory.class, params = {
@Parameter(name = "language", value = "English"),
}),
@TokenFilterDef(factory = SynonymFilterFactory.class, params = {
@Parameter(name = "ignoreCase", value = "true"),
@Parameter(name = "expand", value = "true"),
@Parameter(name = "synonyms", value="synonyms.txt")}),
},charFilters = { @CharFilterDef(factory = HTMLStripCharFilterFactory.class)})
public class ProductArticle implements Serializable, Coordinates, Comparable<ProductArticle>{
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@NotNull
@Column(name = "article_id")
private Integer articleId;
@Lob
@Size(max = 65535)
@Column(name = "a_desc")
@Analyzer(definition = "customanalyzer")
@Field(index = Index.YES, store = Store.YES)
private String aDesc;
@Size(max = 255)
@Column(name = "header")
@Field(index = Index.YES, store = Store.YES)
@Analyzer(definition = "customanalyzer")
private String header;
@Size(max = 64)
@Column(name = "parent_category_name")
@Analyzer(definition = "customanalyzer")
@Field(index = Index.YES, store = Store.YES)
private String parentCategoryName;
@Size(max = 64)
@Column(name = "sub_category_name")
@Analyzer(definition = "customanalyzer")
@Field(index = Index.YES, store = Store.YES)
private String subCategoryName;
@Size(max = 50)
@Column(name = "state")
@Analyzer(definition = "customanalyzer")
@Field(index = Index.YES, store = Store.YES)
private String state;
@Size(max = 50)
@Column(name = "suburb")
@Analyzer(definition = "customanalyzer")
@Field(index = Index.YES, store = Store.YES)
private String suburb;
@Size(max = 5)
@Column(name = "postcode")
@Analyzer(definition = "customanalyzer")
@Field(index = Index.YES, store = Store.YES)
private String postcode;
@Column(name = "latitude")
private Double latitude;
@Column(name = "longitude")
private Double longitude;
@Column(name = "creation_date")
@Field(analyze = Analyze.NO)
@DateBridge(resolution=Resolution.DAY)
private Date creationDate;