-->
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.  [ 6 posts ] 
Author Message
 Post subject: Difference HS <-> Lucene handling caps
PostPosted: Tue Jan 05, 2010 9:39 am 
Regular
Regular

Joined: Thu Nov 26, 2009 8:45 am
Posts: 78
Hi there,
to illustrate my question, just a few searches and their results:

Searching for "Book" with:
HS: 1 result
Luke: 0 results

Searching for "book" with:
HS: 1 result
Luke: 1 result

(of course, all of the results pointing to the same entry, which i originally put to the DB as "book")

is this the expected behaviour? Is there no possibilty to differ between "book" and "Book" in HS?

(using 3.0.1)

thx


Top
 Profile  
 
 Post subject: Re: Difference HS <-> Lucene handling caps
PostPosted: Wed Jan 06, 2010 8:17 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Which analyzer do you use at query time in Luke vs Hibernate Search? The StandardAnalyzer is used by default in Hibernate Search. This analyzer uses the lowercase filter by default. Did you use the analyzer in Luke?
Remember, in most cases you have to use the same analyzer for indexing and searching.

--Hardy


Top
 Profile  
 
 Post subject: Re: Difference HS <-> Lucene handling caps
PostPosted: Wed Jan 06, 2010 8:47 am 
Regular
Regular

Joined: Thu Nov 26, 2009 8:45 am
Posts: 78
in both cases i use the germananalyzer


Top
 Profile  
 
 Post subject: Re: Difference HS <-> Lucene handling caps
PostPosted: Wed Jan 06, 2010 8:57 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Also the GermanAnalyzer uses by default the lowercase filter. In case you want to differentiate between lower and upper case letters you will have to build your own analyzer using for example the @AnalyzerDef framework omitting the LowerCaseFilter. In most cases, however, fulltext search makes more sense if the case is ignored.

--Hardy


Top
 Profile  
 
 Post subject: Re: Difference HS <-> Lucene handling caps
PostPosted: Wed Jan 06, 2010 8:58 am 
Regular
Regular

Joined: Thu Nov 26, 2009 8:45 am
Posts: 78
ok, thx for your fast reply (as always)


Top
 Profile  
 
 Post subject: Re: Difference HS <-> Lucene handling caps
PostPosted: Wed Jan 06, 2010 9:09 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
no problem :)
FYI - http://svn.apache.org/viewvc/lucene/jav ... iew=markup shows how the german analyzer is build using the standard tokenizer, followed by lowercase-, stop- and germanstem-filter.

--Hardy


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