<?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 Re: Is it possible to restrict item types in gis.content.search? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/is-it-possible-to-restrict-item-types-in-gis/m-p/563900#M44092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So would the conclusion be no, it is not possible to use exclusion operators in&amp;nbsp;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; font-size: 14px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;gis&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;search?&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2019 11:24:26 GMT</pubDate>
    <dc:creator>ThomasColson</dc:creator>
    <dc:date>2019-09-18T11:24:26Z</dc:date>
    <item>
      <title>Is it possible to restrict item types in gis.content.search?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-restrict-item-types-in-gis/m-p/563898#M44090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example, I'm wanting to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;itemsList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'created: [1514768400000 TO 1546218000000]'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 max_items &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10000000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 item_type &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Image Collection'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which returns&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/459736_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-restrict-item-types-in-gis/m-p/563898#M44090</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2021-12-12T00:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to restrict item types in gis.content.search?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-restrict-item-types-in-gis/m-p/563899#M44091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;itemsList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'created: [1514768400000 TO 1546218000000]'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 max_items &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10000000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 item_type &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Image Collection'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;from the error message only, it looks like the first parameter just wants the string with the parameter = bit&lt;/P&gt;&lt;P&gt;From the help topic on dir(gis.content.search)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG style="color: #333333; font-family: 'MS Shell Dlg 2'; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #eeeeee;"&gt;Definition :&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: 'MS Shell Dlg 2'; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #eeeeee; display: inline !important; float: none;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: monospace; font-size: 11.7px; color: #333333; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #eeeeee;"&gt;search&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;(&lt;/SPAN&gt;query&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;,&lt;/SPAN&gt; item_type&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;=&lt;/SPAN&gt;None&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;,&lt;/SPAN&gt; sort_field&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;=&lt;/SPAN&gt;'avgRating'&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;,&lt;/SPAN&gt; sort_order&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;=&lt;/SPAN&gt;'desc'&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;,&lt;/SPAN&gt; max_items&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;=&lt;/SPAN&gt;10&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;,&lt;/SPAN&gt; outside_org&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;=&lt;/SPAN&gt;False&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;,&lt;/SPAN&gt; categories&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;=&lt;/SPAN&gt;None&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;,&lt;/SPAN&gt; category_filters&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;=&lt;/SPAN&gt;None&lt;SPAN style="color: red; font-size: 12.87px; font-weight: 900;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:18:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-restrict-item-types-in-gis/m-p/563899#M44091</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T00:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to restrict item types in gis.content.search?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-restrict-item-types-in-gis/m-p/563900#M44092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So would the conclusion be no, it is not possible to use exclusion operators in&amp;nbsp;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; font-size: 14px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;gis&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;search?&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 11:24:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-restrict-item-types-in-gis/m-p/563900#M44092</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2019-09-18T11:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to restrict item types in gis.content.search?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-restrict-item-types-in-gis/m-p/563901#M44093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You just add the query string inside the quotes.&lt;/P&gt;&lt;P&gt;search_result = gis.content.search(query="owner:some_user &lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;NOT &lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Feature Service&lt;/SPAN&gt;")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm" title="https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm"&gt;Search reference—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside the () you can only use = it is just an assignment parameter_1=some_value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 14:31:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-restrict-item-types-in-gis/m-p/563901#M44093</guid>
      <dc:creator>HenryLindemann</dc:creator>
      <dc:date>2019-09-18T14:31:54Z</dc:date>
    </item>
  </channel>
</rss>

