Bob,

Since cts:highlight is aware of the query (not just doing simple string 
matching), there are some query types that you may need to prune out before 
passing the query for highlighting: attribute-based queries and collection 
queries, for example.  I suspect that's what you're experiencing.  

--Colleen
________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Runstein, Robert E. 
(Contr) (IS) [[email protected]]
Sent: Tuesday, August 04, 2009 3:37 PM
To: [email protected]
Subject: [MarkLogic Dev General] cts:highlight issues when combining keyword    
and constaints

Hi,

How do I highlight search results when the query contains both keywords and 
constraints?

I'm using the search API and have defined constraints in the options node I 
pass with my search.  I have a custom transform-results function that creates 
the snippet passing the $ctsquery and the desired section of $results to 
cts:highlight.  This works fine when my query has only keywords or when the 
contraints are ORed with the keywords, but when the constraints are ANDed 
(either implicitly or explicitly) my results contain no highlighting.

I see that the Oscars application result highlighting works when keywords and 
constraints are used together.  Any ideas about what I'm doing wrong?  Thanks.

Bob

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to