<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Query assets with tags via Nuxeo .net client in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/query-assets-with-tags-via-nuxeo-net-client/m-p/321622#M8623</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;In my project I am using the Nuxeo .NET client for querying the assets and until I decided to introduce tags in my project everything worked perfeclty. However, the issue I am facing is querying the assets with more than one tag in the query.&lt;/P&gt;
&lt;P&gt;For example, in the Nuxeo repository I have an image asset tagged with the tags: one, two...
When I trigger the search via Postman using the following query:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM Document WHERE dc:title='CorrectTitle' AND ecm:tag='one' AND ecm:tag='second' AND ecm:isTrashed=0 AND ecm:isVersion=0

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get the correct result.&lt;/P&gt;
&lt;P&gt;However, when I do the same using the nuxeo .NET client like below the result is empty. When only one tag is included in the search query, the result is correct.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Documents docs = (Documents)_nuxeoClient.Operation("Document.Query")
                .SetParameter("query", "SELECT * FROM Document WHERE dc:title='CorrectTitle' AND ecm:tag='one' AND ecm:tag='second' AND ecm:isTrashed=0 AND ecm:isVersion=0")
                .AddHeader("X-NXDocumentProperties", "*")
                .Execute()
                .GetAwaiter()
                .GetResult();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can somebody please tell me what is it that is preventing the .NET client from searching for more than one tag in the document?&lt;/P&gt;</description>
    <pubDate>Sun, 03 May 2020 14:33:40 GMT</pubDate>
    <dc:creator>Roberto_Baranzi</dc:creator>
    <dc:date>2020-05-03T14:33:40Z</dc:date>
    <item>
      <title>Query assets with tags via Nuxeo .net client</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/query-assets-with-tags-via-nuxeo-net-client/m-p/321622#M8623</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;In my project I am using the Nuxeo .NET client for querying the assets and until I decided to introduce tags in my project everything worked perfeclty. However, the issue I am facing is querying the assets with more than one tag in the query.&lt;/P&gt;
&lt;P&gt;For example, in the Nuxeo repository I have an image asset tagged with the tags: one, two...
When I trigger the search via Postman using the following query:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM Document WHERE dc:title='CorrectTitle' AND ecm:tag='one' AND ecm:tag='second' AND ecm:isTrashed=0 AND ecm:isVersion=0

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get the correct result.&lt;/P&gt;
&lt;P&gt;However, when I do the same using the nuxeo .NET client like below the result is empty. When only one tag is included in the search query, the result is correct.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Documents docs = (Documents)_nuxeoClient.Operation("Document.Query")
                .SetParameter("query", "SELECT * FROM Document WHERE dc:title='CorrectTitle' AND ecm:tag='one' AND ecm:tag='second' AND ecm:isTrashed=0 AND ecm:isVersion=0")
                .AddHeader("X-NXDocumentProperties", "*")
                .Execute()
                .GetAwaiter()
                .GetResult();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can somebody please tell me what is it that is preventing the .NET client from searching for more than one tag in the document?&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 14:33:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/query-assets-with-tags-via-nuxeo-net-client/m-p/321622#M8623</guid>
      <dc:creator>Roberto_Baranzi</dc:creator>
      <dc:date>2020-05-03T14:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query assets with tags via Nuxeo .net client</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/query-assets-with-tags-via-nuxeo-net-client/m-p/321623#M8624</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Your NXQL query should be &lt;CODE&gt;SELECT * FROM Document WHERE dc:title='CorrectTitle' AND ecm:tag IN('one','second') AND ecm:isTrashed=0 AND ecm:isVersion=0"&lt;/CODE&gt; for document with &lt;CODE&gt;one&lt;/CODE&gt; or &lt;CODE&gt;second&lt;/CODE&gt; tag. If you need &lt;CODE&gt;AND&lt;/CODE&gt; (meaning, your need the two tags on the document), it should be &lt;CODE&gt;SELECT * FROM Document WHERE dc:title='CorrectTitle' AND ecm:tag/* = 'one' AND ecm:tag/* = 'second' AND ecm:isTrashed=0 AND ecm:isVersion=0"&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;This is described in &lt;A href="https://doc.nuxeo.com/nxdoc/nxql/#special-nxql-properties"&gt;https://doc.nuxeo.com/nxdoc/nxql/#special-nxql-properties&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 16:40:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/query-assets-with-tags-via-nuxeo-net-client/m-p/321623#M8624</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2020-05-03T16:40:23Z</dc:date>
    </item>
  </channel>
</rss>

