With fast-reverse-searches=false, all we store in the index is the fact
that there was a serialized query and any use of cts:reverse-query()
will run entirely in the filter. Obviously, this will not perform well.
Re: how you can get around ill-formed queries with
fast-reverse-searches=true, your approach of changing the namespace is
what I going to suggest. When you're ready to fill in the term, rewrite
the document in the cts namespace and the query will go into the reverse
index.
Wayne.
On 07/04/2014 02:23 PM, William Sawyer wrote:
That's what I was thinking as well. I ended up just removing the cts
namespace and then add it back when evaulating the placeholders.
Thanks,
-Will
On Jul 4, 2014 2:32 PM, "Gavin Haydon"
<[email protected]
<mailto:[email protected]>> wrote:
Hi
I suspect that the fast reverse index is attempting to index all
serialised cts query elements that are saved into the database.
This way it can support those fast reverse queries you might want
to perform, and find the fragments containing the matching cts query.
Your serialised cts query has been modified to contain
placeholders, and as such is no longer valid against the schema
for cts query, or the expectations of the fast index. Could be
that you simply cant fast index customised cts queries?
The standard reverse index seems to be more tolerant (and is
slower), relying heavily upon filtering to remove the false
positives. It may not run the same checks upon a save.
Hope this helps.
Regards
Gavin Haydon
Sent from my iPad
On 4 Jul 2014, at 20:30, "William Sawyer" <[email protected]
<mailto:[email protected]>> wrote:
I am trying to save a serialized cts:query with placeholder
values into a document and it keeps throwing an XDMP-REVIDXBADQRY
error.
Example.
<root-node>
<query>
<cts:and-query xmlns:cts="http://marklogic.com/cts">
<cts:element-attribute-value-query>
<cts:element>node</cts:element>
<cts:attribute>type</cts:attribute>
<cts:text xml:lang="en"><variable
name="type"/></cts:text>
<cts:option>exact</cts:option>
</cts:element-attribute-value-query>
<cts:element-attribute-value-query>
<cts:element
xmlns:meta="http://test.com/meta">meta:meta</cts:element>
<cts:attribute>id</cts:attribute>
<cts:text xml:lang="en"><variable
name="id"/></cts:text>
<cts:option>exact</cts:option>
</cts:element-attribute-value-query>
</cts:and-query>
</query>
</root-node>
I found the document will save if I remove my placeholder
elements. Also found if I turn off "fast reverse searches" index
then it saves. I want to be able to quickly replace any
placeholder values and then pass it into cts:query(). Is there a
way to keep that index on and keep my placeholder elements?
ML: 7.0-2.3
Thanks,
-Will
_______________________________________________
General mailing list
[email protected]
<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general
This email is from the Press Association. For more information,
see www.pressassociation.com <http://www.pressassociation.com>.
This email may contain confidential information. Only the
addressee is permitted to read, copy, distribute or otherwise use
this email or any attachments. If you have received it in error,
please contact the sender immediately. Any opinion expressed in
this email is personal to the sender and may not reflect the
opinion of the Press Association. Any email reply to this address
may be subject to interception or monitoring for operational
reasons or for lawful business practices.
_______________________________________________
General mailing list
[email protected]
<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
--
Wayne Feick
Principal Engineer
MarkLogic Corporation
[email protected]
Phone: +1 650 655 2378
www.marklogic.com
This e-mail and any accompanying attachments are confidential. The information
is intended solely for the use of the individual to whom it is addressed. Any
review, disclosure, copying, distribution, or use of this e-mail communication
by others is strictly prohibited. If you are not the intended recipient, please
notify us immediately by returning this message to the sender and delete all
copies. Thank you for your cooperation.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general