-->
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: Subword Analizer!?
PostPosted: Fri May 02, 2008 1:30 pm 
Newbie

Joined: Mon Apr 21, 2008 3:27 pm
Posts: 5
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate Search version: 3.0.1.GA

Hi, i have a little question for hibernate search.
I want to search for something, and i want that the search matches subwords.
For example, if i search "Cris", and if i have indexed names, and one name is "Cristian", i want that the search shows me that result.
It can be posible? With an Analizer?

Thanks,

Cristian Ventura.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 02, 2008 2:05 pm 
Hibernate Team
Hibernate Team

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

basically there are several ways to approach this problem. The easiest way would be to just utilize wildcard queries. Unfortunately, this won't scale very well and one gets quite soon a TooManyClausesException.

Implementing a custom analyzer or FieldBridge is an alternative which I successfully used myself before. Here are some links which might help you find a solution to your problem:

* http://www.gossamer-threads.com/lists/lucene/java-user/54591?nohighlight=1#54591
* http://www.gossamer-threads.com/lists/lucene/java-user/34251?do=post_view_threaded#34251
* http://www.gossamer-threads.com/lists/lucene/java-user/1880#1880

Hope you find the information you are after.

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 8:03 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
an alternative is to use an n-gram analyzer (which is the generalized solution to your specific problem :) ). I describe it in Hibernate Search in Action.
Generally speaking, Hibernate Search 3.1 will come with a nice way to set up those kind of special analyzers (already in trunk). We reuse the Solr infrastructure.

_________________
Emmanuel


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.