-->
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.  [ 1 post ] 
Author Message
 Post subject: most efficient way to do a search engine
PostPosted: Fri Apr 21, 2006 5:09 pm 
Newbie

Joined: Fri Apr 21, 2006 11:25 am
Posts: 3
1.0.2

[b]sql 2000b]



I have an object and it has like 7 properties. I need to be able to do a KEYWORD search on all these properties..

So like if they type in
'DISH'

it searches for the word DISH within any of those properties....

I've tried a few things....
Code:
query.Append("Select distinct dtls.ItemId from ItemDetails as dtls
where ");



                    query.Append(" dtls.Name LIKE '%" + lstKeywords[0] + "%' ");
                    query.Append(" or dtls.Description LIKE '%" + lstKeywords[0] + "%'");
                    query.Append(" or dtls.Specifications LIKE '%" + lstKeywords[0] + "%'");
                    query.Append(" or dtls.MainFeatures LIKE '%" + lstKeywords[0] + "%'");


                    IQuery nQuery = NSession.CreateQuery(query.ToString());



but that's pretty slow.....

other ideas?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.