-->
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: how to add a new stop word into StandardAnalyzer
PostPosted: Sat Jan 24, 2009 2:30 am 
Newbie

Joined: Sat Jan 24, 2009 2:19 am
Posts: 3
Hi every one

I'm using Hibernate Search.
I can index and search properly.
I am using the default StandardAnalyzer for indexing and query parsing.
I need to add a new stop word "-" into StandardAnalyzer.
Because the following string "DSE-s700" are indexded as a single word by StandardAnalyzer .
if the user use "DSE s700" as a search string, it wont return the any result. but i need to give the "DSE-s700" as a result.

i can define the analyzer external for a field , but i cant add a new stop word into it.

Code:
@Entity
@Table(name = "TBL_PRODUCTS")
@Indexed
public class TopSixPicks implements Serializable{

       @Id   
   @DocumentId
   private BigDecimal productId;

   @Field(index=Index.TOKENIZED)
   @Analyzer(impl = StandardAnalyzer.class)
   private String productName;
}


Any help how to do this ..

by
Thiagu.m


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.