-->
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: Comma separated searches
PostPosted: Thu May 26, 2011 4:07 pm 
Regular
Regular

Joined: Tue May 17, 2011 1:45 am
Posts: 52
Hi All,

Is it possible to do the following search :

Search text entered : Best Western Inn california,new york

In the document we have two fields :

Field 1 : name of hotel
Field 2: state name

So when I enter the above mentioned search text, the expectation is that the search would look for "best western inn" in california OR "best western inn" in New york such that the results should contain all Best Western Inn in locations California or New York

Thanks,
David


Top
 Profile  
 
 Post subject: Re: Comma separated searches
PostPosted: Fri May 27, 2011 5:44 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
if that's your exact requirement you could split the input string on the ",", and then match both parts on the two fields, that would work but you-ll have to think what to do with input strings having no comma at all or multiple ones; for those cases I'd match the full string against both fields and let the search engine figure out the most relevant results.

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


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.