-->
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: Searching for fields containing punctuation characters
PostPosted: Tue Apr 07, 2009 6:58 am 
Beginner
Beginner

Joined: Tue Feb 03, 2009 12:29 pm
Posts: 49
hi,

In our case, there are search fields that contain characters like "-" and "/ ". (For example, there is a field named 'model' which contains values like 'DS/340' )

We have a text field where the user can type in search words for searching against multiple fields, one of which is the 'model' field. We were planning to use StandardAnalyzer for this, but since it splits words at punctuation characters, we will have a problem. Is there any simple way to configure the delimiters to be used for tokenizing or will we need to write a new tokenizer? The StandardTokenizer implementation seems quite complex, hence the concern.

Thanks,
Seema


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 08, 2009 6:21 am 
Hibernate Team
Hibernate Team

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

there are many ways to solve this. Depending on your input the PatternTokenizerFactory from the Solr framework might be the way to go. Check the Hibernate Search online documentation to see how to use this factory using the @AnalyzerDef annotation.

Provided you can specify a regular expression which properly splits your input into tokens you should be fine.

--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.