SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: Highlighter with CompassSearchHelper

This question is answered.


Permlink Replies: 44 - Pages: 3 [ 1 2 3 | Next ] - Last Post: Dec 9, 2011 8:04 PM Last Post By: anitas
jolinar13

Posts: 129
Registered: 12/21/06
Highlighter with CompassSearchHelper
Posted: May 2, 2007 3:52 AM
 
  Click to reply to this thread Reply
Hello,

Is there a way to use the Highlighter with CompassSearchHelper?

Thanks,
Florian
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Highlighter with CompassSearchHelper
Posted: May 2, 2007 3:40 PM   in response to: jolinar13 in response to: jolinar13
Correct
  Click to reply to this thread Reply
You can extend it and override doProcessBeforeDetach and add the highlighted text there.
jolinar13

Posts: 129
Registered: 12/21/06
Re: Highlighter with CompassSearchHelper
Posted: May 21, 2007 8:46 AM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
Hello again,

I still cannot make it work. This is my current code. I don't know what to use for the fragment parameter, since I don't know which class my object is.

	protected void doProcessBeforeDetach(CompassSearchCommand searchCommand,
			CompassSession session, CompassHits hits, int from, int size) {
 
		for(int i=from; i<from+size; i++) {
			
			hits.highlighter(i).fragment(??????);
		}
	}


I also fear this tool is not designed for what I expect it to do.

My app works exactly like the petclinic example : several objects from different classes can be returned. Like in petclinic, I display different strings and properties, based on the alias of the object. I would like to highlight criteria terms in each displayed data string, for the user to know why each hit was returned.

What do you advise?

Thanks a lot
Florian
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Highlighter with CompassSearchHelper
Posted: May 21, 2007 3:09 PM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
What I would suggest doing is highlight each part of what you display (keep an eye on performance). You can use the alias to decide which fields you need to highlight. A simple preconfigured hash lookup based on the alias with a list of the properties to highlight.
jolinar13

Posts: 129
Registered: 12/21/06
Re: Highlighter with CompassSearchHelper
Posted: May 21, 2007 3:16 PM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
Thank you for your answer.
Preconfigured hash lookup?
I don't understand. It's completely obscure in my mind.
Could you please enlighten it a little bit?
Thank you very much
Florian
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Highlighter with CompassSearchHelper
Posted: May 23, 2007 2:56 AM   in response to: jolinar13 in response to: jolinar13
Helpful
  Click to reply to this thread Reply
Sure:

You could have a hash map, with the the key being the alias name, and the value is a list of property names you wish to highlight. You could init this hash map during startup (in Spring for example), and then, when a search is performed, you could use the alias to look up the list of property names you wish to highlight, and call the highlight on them.
discount oakley...

Posts: 35
Registered: 8/20/11
Re: Highlighter with CompassSearchHelper
Posted: Aug 20, 2011 4:19 AM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
Looking attractive and smart in the fingers of the other people has been the aspiration for any ladies. In order to get noticed instantly, pandora jewelry have the new philosophy of out standing fashion quality.So what is the best choice for you to show yourself .The answer is pandora bracelets.Full of colorful pandora charms can take you different visual effects. The Pandora range of rings is a wealth of beautiful gemstones and precious metals combined with fabulous design.So choose our pandora beads to witness the eternity and originality. pandora jewelry sale store offer pandora bracelets and pandora charms,choose varieties of cheap pandora charms from pandora bracelets sale outlet.up to 70% discount.
louisvuittonbox

Posts: 411
Registered: 8/23/11
Re: Highlighter with CompassSearchHelper
Posted: Aug 23, 2011 9:52 PM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
Producing fabulous high end fashion year after year and season after season, gucci outlet is arguably the world's most prestigious designer of clothes. As you would expect from a gucci outlet online that started out solely making leather goods, they are best known for their classic range of gucci bags and gucci handbags which usually feature the trademark company logo or pattern and come either in leather or canvas finishes which look perfect when coupled with matching gucci shoes. Ladies Gucci Shoes are simply the perfect footwear for any occasion and here at Profile we stock a large selection including Gucci Boots, Flats and High Heels. They are designer shoes of the highest quality.
louisvuittonbox

Posts: 411
Registered: 8/23/11
Re: Highlighter with CompassSearchHelper
Posted: Aug 23, 2011 9:55 PM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
Producing fabulous high end fashion year after year and season after season, gucci outlet is arguably the world's most prestigious designer of clothes. As you would expect from a gucci outlet online that started out solely making leather goods, they are best known for their classic range of gucci bags and gucci handbags which usually feature the trademark company logo or pattern and come either in leather or canvas finishes which look perfect when coupled with matching gucci shoes. Ladies Gucci Shoes are simply the perfect footwear for any occasion and here at Profile we stock a large selection including Gucci Boots, Flats and High Heels. They are designer shoes of the highest quality.
hmq123

Posts: 449
Registered: 8/22/11
christian louboutin
Posted: Aug 24, 2011 10:21 PM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
How christian louboutin should I heard cheap louboutin shoes that, about your right discount christian louboutin shoes and wrong? How Christian Louboutin Pumps should I heard, was able to Christian Louboutin Ankle Boots smile? How should I heard, you good, for her not to let the http://www.louboutinsshoes2u.com/ tears?
hmq123

Posts: 449
Registered: 8/22/11
Louboutins Shoes Sale
Posted: Aug 24, 2011 10:24 PM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
Fresh Louboutins Shoes Sale sweet smile like the Christian Louboutin Shoes wine you drink, the more Cheap Christian Louboutin mellow Christian Louboutin Glitter Pumps life, elegant lingering smile Cheap Louboutin Booties like read the poem, the more http://www.louboutinsshoes4sale.com/ romantic life.
hmq123

Posts: 449
Registered: 8/22/11
Discount Christian Louboutin Shoes
Posted: Aug 24, 2011 10:26 PM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
A smile Discount Christian Louboutin Shoes is healthy, the smile Christian Louboutin Shoes is success, but only Christian Louboutin sale smile and life, and life Cheap Wedding Shoes road to the colorful, just Christian Louboutin Ankle Boots won't give his life with http://www.cheap-christianlouboutinpumps.com/ regrets.
hmq123

Posts: 449
Registered: 8/22/11
Cheap Louboutins
Posted: Aug 24, 2011 10:28 PM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
A smile is the most Cheap Louboutins moving people expression, Christian Louboutin Shoes life is good and silent Christian Louboutin Discount language, only smile Christian Louboutin Wedding life, the Louboutin Open-toe Booties mood will be relaxed and http://www.cheaplouboutins-shop.com/ cheerful.
hmq123

Posts: 449
Registered: 8/22/11
christian louboutin sale
Posted: Aug 24, 2011 10:30 PM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
In middle christian louboutin sale age, experience christian louboutin shoes rains and winds, have discount louboutin sale seen the rainbow. Through Christian Louboutin Peep Toe Pumps pain, also get the Christian Louboutin Sandal Booties joy. Experienced setbacks, and bear witness to the http://www.discountlouboutins-sale.com/ success.
hmq123

Posts: 449
Registered: 8/22/11
New Moncler Jackets
Posted: Aug 24, 2011 10:33 PM   in response to: jolinar13 in response to: jolinar13
 
  Click to reply to this thread Reply
Self-confidence New Moncler Jackets is not conceit, it is not proud, New Moncler Coats is important, Moncler Online Store is the spiritual pillar of the Cheap Moncler Men Jackets behavior of the Moncler Jackets Women self, self motivation is the incentive to overcome difficulties reach the goal of http://www.moncler-officialwebsite.com/ energy.
Legend
Guru: 2001 + pts
Expert: 501 - 2000 pts
Super-star: 101 - 500 pts
Assistant: 51 - 100 pts
Participant: 0 - 50 pts
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums