<?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: Misbehavior on ILIKE with ElasticSearch: &amp;apos;%&amp;apos; at begining required in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313743#M744</link>
    <description>&lt;P&gt;Yes, he has, he can see same documents as Administrator, in fact, the documents are available vía browsing. The misbehavior is in the search page.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Nov 2015 17:50:21 GMT</pubDate>
    <dc:creator>JVent_</dc:creator>
    <dc:date>2015-11-16T17:50:21Z</dc:date>
    <item>
      <title>Misbehavior on ILIKE with ElasticSearch: &amp;apos;%&amp;apos; at begining required</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313741#M742</link>
      <description>&lt;P&gt;Hi, I'm getting a misbehavior with elasticsearch while casting a NXQL query with ILIKE operators. I mapped the fields &lt;EM&gt;lowercase_analyzer&lt;/EM&gt; in the elasticsearch config file. It works perfect with ElasticSearch, but it cast different result depending on user type.&lt;/P&gt;
&lt;P&gt;For example, an Administrator execute this NXQL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM Document WHERE ecm:mixinType != 'HiddenInNavigation' AND ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted' AND pre:myCustomField ILIKE 'CUSTOM%'
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And the query returns all results that starts with CUSTOM in that field, for example CUSTOM00001, CUSTOM0002... etc.&lt;/P&gt;
&lt;P&gt;But the same query executed with a normal user returns 0 results. I have to execute the query using the wildcart at the begining&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM Document WHERE ecm:mixinType != 'HiddenInNavigation' AND ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted' AND pre:myCustomField ILIKE '%CUSTOM%'
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It happens with any field I configured and mapping for ilike in elasticsearch.&lt;/P&gt;
&lt;P&gt;myCustomField is a String. The fields are mapped like the example in the blog:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;"pre:myCustomField": {                                
	  "type": "multi_field",                 
	  "fields" : {                             
	    "pre:myCustomField": {                          
	      "include-in-all": true,              
	      "type": "string"                   
	    },                                       
	    "lowercase": {                         
	      "type": "string",                  
	      "analyzer": "lowercase_analyzer"   
	    }                                        
	  }                                          
	}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jul 2015 15:41:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313741#M742</guid>
      <dc:creator>JVent_</dc:creator>
      <dc:date>2015-07-23T15:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Misbehavior on ILIKE with ElasticSearch: &amp;apos;%&amp;apos; at begining required</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313742#M743</link>
      <description>&lt;P&gt;Does the normal user have enough rights to access to the documents fetched to the administrator?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 11:20:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313742#M743</guid>
      <dc:creator>Greg_Drayon</dc:creator>
      <dc:date>2015-11-12T11:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Misbehavior on ILIKE with ElasticSearch: &amp;apos;%&amp;apos; at begining required</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313743#M744</link>
      <description>&lt;P&gt;Yes, he has, he can see same documents as Administrator, in fact, the documents are available vía browsing. The misbehavior is in the search page.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 17:50:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313743#M744</guid>
      <dc:creator>JVent_</dc:creator>
      <dc:date>2015-11-16T17:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Misbehavior on ILIKE with ElasticSearch: &amp;apos;%&amp;apos; at begining required</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313744#M745</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;If I understand well the same query (&lt;CODE&gt;ILIKE 'CUSTOM%'&lt;/CODE&gt;) works for an administrator and not for a user that has the right to see the matching documents.&lt;/P&gt;
&lt;P&gt;First make sure that the lowercase mapping is up to date by reindexing the repositories from the Admin Center/Elasticsearch/Admin.
If it does not fix the problem, you can activate the Elasticsearch trace as described here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://doc.nuxeo.com/display/ADMINDOC60/Elasticsearch+Setup#ElasticsearchSetup-ActivateTraces" target="test_blank"&gt;https://doc.nuxeo.com/display/ADMINDOC60/Elasticsearch+Setup#ElasticsearchSetup-ActivateTraces&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;So we can analyze the Elasticsearch request and response.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;ben&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 14:08:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313744#M745</guid>
      <dc:creator>ben_</dc:creator>
      <dc:date>2015-11-17T14:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Misbehavior on ILIKE with ElasticSearch: &amp;apos;%&amp;apos; at begining required</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313745#M746</link>
      <description>&lt;P&gt;The two queries are different&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 07:49:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313745#M746</guid>
      <dc:creator>pibou_Bouvret</dc:creator>
      <dc:date>2018-10-22T07:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Misbehavior on ILIKE with ElasticSearch: &amp;apos;%&amp;apos; at begining required</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313746#M747</link>
      <description>&lt;P&gt;[pibou Bouvret](https&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 07:59:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/misbehavior-on-ilike-with-elasticsearch-apos-apos-at-begining/m-p/313746#M747</guid>
      <dc:creator>JVent_</dc:creator>
      <dc:date>2018-10-22T07:59:02Z</dc:date>
    </item>
  </channel>
</rss>

