Query highlighting

Post Reply
andreas.eriksson
Posts: 19
Joined: Tue May 24, 2005 4:16 am

Query highlighting

Post by andreas.eriksson »

I'm using Search Appliance SBE Server Version 5.01 and the dropXsl=yes option to retrieve results in xml format.

The highlighting of the query in the xml using <b> tags is messing things up for me:
...
<ResultTitle><b>query</b> abc123</ResultTitle>
...

Is there a setting somewhere to turn off the highlighting?

Regards,

Andreas
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Query highlighting

Post by mark »

There's no option to turn off the highlighting. How is it messing things up?
andreas.eriksson
Posts: 19
Joined: Tue May 24, 2005 4:16 am

Query highlighting

Post by andreas.eriksson »

I'm using an Asp.Net XmlReader to fetch the xml and read it into a DataSet using the DataSet.ReadXml() method, after which I render the output using a Repeater control databound to the DataSet.Tables("Result").DefaultView.

The problem is that the DataSet interprets (correctly, one might argue) the <b>...</b> as a separate node in the xml structure.
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Query highlighting

Post by jason112 »

> The problem is that the DataSet interprets (correctly,
> one might argue) the <b>...</b> as a separate node in
> the xml structure.

Indeed, the <b> tags are being represented as a separate, sub-nodes in the XML structure, even though we consider the text "part of" the parent <ResultTitle>.

This is a common convention (it's how XHTML works, after all) and because of this most XML APIs offer a way to get the content of an element and all of its children. I'm not familiar with Microsoft's xmlReader, though.

Regardless of whether it's possible with an xmlReader or not, I can certainly understand someone might want the XML with "flat" text elements, i.e. no query highlighting. We'll look at including an search option to disable Query Highlighting.
andreas.eriksson
Posts: 19
Joined: Tue May 24, 2005 4:16 am

Query highlighting

Post by andreas.eriksson »

Fair enough.

In my case, i ended up "washing" the xml string before using it, no biggie.

Thanks for the swift response though.
Post Reply