-->
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.  [ 3 posts ] 
Author Message
 Post subject: Attribute not searched but used in sorting...how?
PostPosted: Tue Dec 16, 2008 12:06 pm 
Beginner
Beginner

Joined: Mon Aug 22, 2005 1:22 am
Posts: 36
I have an attribute on object Business (averageRating) that is not to be used in my full text search. However, I want to use it in sorting.

How should this be configured in my Business object? Currently I have:

@Field( index = Index.UN_TOKENIZED )
private Double averageRating;
@Field( index = Index.UN_TOKENIZED )
private Double averageFrequency;

Thanks,

- Doug


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 16, 2008 2:13 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
it should just work with your settings, you need to index the sorter field even if you don't need it for searches.
What is the problem?

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Attribute not searched but used in sorting...how?
PostPosted: Tue Dec 16, 2008 5:19 pm 
Beginner
Beginner

Joined: Mon Aug 22, 2005 1:22 am
Posts: 36
Here is the message:

java.lang.RuntimeException: field "averageRating" does not appear to be indexed
at org.apache.lucene.search.ExtendedFieldCacheImpl$5.createValue(ExtendedFieldCacheImpl.java:173)


AverageRating is null to start off...can it be?

Is there a way to have null values or mimic null values?


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

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.