-->
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.  [ 2 posts ] 
Author Message
 Post subject: TOKENIZED can not be resolved
PostPosted: Tue Dec 13, 2011 4:00 pm 
Newbie

Joined: Thu Dec 08, 2011 5:43 pm
Posts: 7
Why won't my code let me tokenize the index? Eclipse yells at me with "TOKENIZED can not be resolved"

Here's the bit of code
Code:
   @Field(index = org.hibernate.search.annotations.Index.TOKENIZED, store = Store.YES)
// I get the same result if I just use '@Field(index=Index.TOKENIZED, store=Store.Yes)
   @Boost(value=2.0f)
   @NotNull
   @Size(min = 1, max = 25)
   @Pattern(regexp = "[A-Za-z ]*", message = "must contain only letters and spaces")
   private String name;


Here's what I'm importing:
Code:
import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

//import org.hibernate.search.annotations.DateBridge; 
import org.hibernate.search.annotations.DocumentId; 
import org.hibernate.search.annotations.Field; 
import org.hibernate.search.annotations.Index; 
import org.hibernate.search.annotations.Indexed; 
//import org.hibernate.search.annotations.IndexedEmbedded; 
//import org.hibernate.search.annotations.NumericField; 
//import org.hibernate.search.annotations.Resolution; 
import org.hibernate.search.annotations.Store;
import org.hibernate.search.annotations.Boost;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;


I feel like this is something really obvious, but... I'm missing it. Ideas?


Top
 Profile  
 
 Post subject: Re: TOKENIZED can not be resolved
PostPosted: Wed Dec 14, 2011 9:01 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

which version of Search are you using? Any change you are upgrading from an older version to 4.x version? TOKENIZED has been replaced with ANALYZED in 4.0.0.Beta1 (see also http://community.jboss.org/wiki/Hiberna ... ationGuide)

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.