-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Querying against Component properties question
PostPosted: Mon Dec 22, 2008 7:38 pm 
Beginner
Beginner

Joined: Mon Aug 22, 2005 1:22 am
Posts: 36
I have a couple of questions about using Components in Search.

I have a Business object that is defined below.

@Indexed(index = "businesses")
public class Business {
...
@DocumentId
private Integer businessId;

@Field(index = Index.TOKENIZED)
private String name;

private LatLng latLng = new LatLng();
...
@Field(index = Index.UN_TOKENIZED, store=Store.YES)
private Double averageRating = 0.0;
@Field(index = Index.UN_TOKENIZED, store=Store.YES)
private Double averageFrequency = 0.0;

}

LatLng is a reusable Component across applications (some not using Hibernate Search)

public class LatLng {
...
private Double lat;
private Double lng;
...
}

LatLng is a reusable component that I want to restrict my searches against, i.e. within a certain geographical location as well as a full text search on numerous other Business properties.

First of all...can this be done? If so...how?
Do I need to declare LatLng as Indexable?
Can I restrict my FullTextSearch query with a Hibernate Criteria against lat/lng?
Do I need to "store=Store.YES" for averageRating/Frequency if I want to sort by these?

If not, what is the best approach to be able to achieve this behavior?

Thanks in advance.
- Doug


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.