[MarkLogic Dev General] Find exact query submitted

Shah, Mehul (LNG-NPV) mehul.shah at lexisnexis.com
Wed Mar 21 06:47:41 PDT 2012


I guess I should have asked question a bit differently with original purpose;

What we are looking for is hit highlighting in non-xml/text documents in its native form (like pdf, word).
One way we were thinking is to use expanded terms for a query and highlight in native document ourselves;
So we are looking for an option to return all possible term expansions for a query from marklogic – is it possible?

Is there any other way to hit-highlight in native document?


FYI:
Previously I tried this:
…<options xmlns="http://marklogic.com/appservices/search">
<term>
  <term-option>stemmed</term-option>
</term>
  <return-query>true</return-query>
</options>
return search:search("ran",$options)


I am expecting all possible expanded values it may be searching – e.g. ran, run, running…
However I get following:
…<search:qtext>ran</search:qtext>
−
<search:query>
−
<cts:word-query qtextref="cts:text">
<cts:text>ran</cts:text>
<cts:option>stemmed</cts:option>
</cts:word-query>
</search:query>
−
<search:metrics>
…


Thanks.


From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Ryan Dew
Sent: Tuesday, March 20, 2012 6:45 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Find exact query submitted

If this is for search:search you might want to add the following to your search options

<return-query>true</return-query>

-Ryan Dew
On Tue, Mar 20, 2012 at 4:37 PM, Shah, Mehul (LNG-NPV) <mehul.shah at lexisnexis.com<mailto:mehul.shah at lexisnexis.com>> wrote:
Is there a way to see exactly how the query was expanded and submitted finally?
i.e. certain terms may be eliminated, certain terms may be stemmed, or there may be use of synonyms -- I want to know finally what was the query that was searched.

Can I retrieve that as part of search result?

Thanks.

_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120321/fa5b90d8/attachment-0001.html 


More information about the General mailing list