I've been trying to compose a basic command line search using the CLT:
iwsrchquery -f query.xml eemea\qdarfer 1 /default/main/B2B/ImportRequests contentThe query is simple enough and just tries to find an extended attribute with a certain value:
<predicate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="TeamSiteSearch.xsd">
<attributeComparison>
<name>MyAttribs/UniqueId</name>
<operator>EQ</operator>
<value>811129ed257d560f5aafcfc2e0018fa173de</value>
</attributeComparison>
</predicate>
I know that my attrib is indexed, as I can perform this search and obtain expected results through CCpro.
When I run the CLT i get a response.
<data>
<query_id>N27KDVNF</query_id>
<return_code>0</return_code>
</data>
There isn't a great deal in the way of docs on how to formulate these queries, so I am prepared for a bit of trial enad error.
I started to poke around the log files.
I notice that if the query is not valid you get something like this:
[16 jan 2006 14:58:07,146] ERROR com.interwoven.hunter.search.QueryDOMProcessor (Thread-33) - Error adjusting search query DOM.
java.lang.NullPointerException
at com.interwoven.hunter.search.QueryDOMProcessor.convertAttrs(QueryDOMProcessor.java:364)
at com.interwoven.hunter.search.QueryTranslator.adjustDOM(QueryTranslator.java:304)
at com.interwoven.hunter.search.QueryTranslator.doTranslation(QueryTranslator.java:284)
at com.interwoven.hunter.search.QueryTranslator.translate(QueryTranslator.java:231)
at com.interwoven.hunter.search.QueryProcessor$TranslatorThreadLocal.translate(QueryProcessor.java:72)
at com.interwoven.hunter.search.TeamSiteQueryProcessor.doQuery(TeamSiteQueryProcessor.java:72)
at com.interwoven.hunter.search.commands.QueryCommand.execute(QueryCommand.java:103)
at com.interwoven.hunter.search.SearchWorker.run(SearchWorker.java:88)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:534)
in iw.tssearch.log. Much to my annoyance I notice that you also get this message sometimes with valid query xml if you happen to have a new line or tab in the wrong place.
My question is in three parts.
1. Can anyone help me with my original matching EA value query?
2. Is there a better way to develop and test queries (better than tailing the logfile to see if query is valid)?
3. Is there anyway of logging queries made through the UI, so we can just copy the query xml and run it using the CLT.
Thanks!
Darren.