-->
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.  [ 4 posts ] 
Author Message
 Post subject: Search query returning different results than in Luke
PostPosted: Thu Mar 29, 2012 11:24 am 
Newbie

Joined: Wed Nov 24, 2010 4:49 pm
Posts: 3
Running this query:

companyname:"IADA\-ADA OF THE SOUTHWEST" AND address.addresslineone:"2007 Ridgecrest Dr SE" AND address.city:"Albuquerque" AND address.state:"NM" AND address.postalcode:"87108"

through Hibernate Search produces 0 results, however the same query running through Luke produces the 1 result I would expect. I've configured Luke to use the same analyzer (StandardAnalyzer) that our code uses.

We're using lucene 2.9.3, hibernate-search 3.2.1.Final

Any ideas?


Top
 Profile  
 
 Post subject: Re: Search query returning different results than in Luke
PostPosted: Thu Mar 29, 2012 7:10 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
Hibernate Search feeds the query directly to Lucene, the only "filtering" it applies might be:
a) the target object type, if you use a target type and it's not matching.
b) the matching document exists in the index, but not in the database: unless you're using projection loading, the matches are still loaded from the database and if not existing silently discarded (to avoid mismatches from the async backend).

The result of
Code:
query.getResultSize();

is not matched with the database. What's his result?

If this doesn't help, could you provide a test?

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Search query returning different results than in Luke
PostPosted: Thu Mar 29, 2012 7:10 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Also, is Luke using the same Lucene version as your application?

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Search query returning different results than in Luke
PostPosted: Fri Mar 30, 2012 12:11 am 
Newbie

Joined: Wed Nov 24, 2010 4:49 pm
Posts: 3
Thanks for the explanations.

I think the only explanation at this point is a different Lucene version as you suspected. The difficult thing is that Luke ships will all the lucene source expanded into its jar file, I can't figure out an easy way to tell what version of the source it includes.


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