-->
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: [Hibernate Search] General Query
PostPosted: Mon May 14, 2007 3:25 am 
Regular
Regular

Joined: Wed Apr 25, 2007 10:29 am
Posts: 110
Location: France
Hello,

I tried general query in Hibernate Search.

Exemple : "divers" but it returns nothing. If my query is for example "titre:divers", I have results.

I read in Lucene documentation that if a query is "title:Do it right". "it" and "right" are in the default field.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 14, 2007 1:37 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
you have to explicit all the fields but the default ones
When you create the LuceneQueryParser, you pass one (or a list of) default fields to look for.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 15, 2007 5:54 am 
Regular
Regular

Joined: Wed Apr 25, 2007 10:29 am
Posts: 110
Location: France
Ok, thank you.
I create a long query with all fields (field1:word OR field2:word OR field3:word).

The other solution is to use a MultiFieldQueryParser.


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.