<?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: Sorting error when using fts-alfresco in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116975#M32386</link>
    <description>&lt;P&gt;The query i shared is the same query you posted here. When you execute it via js, you have to escape the characters.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 May 2020 19:27:02 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2020-05-29T19:27:02Z</dc:date>
    <item>
      <title>Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116967#M32378</link>
      <description>&lt;P&gt;There seems to be an issue with trying to sort on a base model field when I use a custom aspect in my query. This is the query I am trying to run:&lt;/P&gt;&lt;PRE&gt;var def = {
	query: 'TYPE:"cm:person" AND gf:userOrgs:RECEIVERORG',
	store: "workspace://SpacesStore",
	language: "fts-alfresco",
	page: {
		maxItems: 100,
		skipCount: 0
	},
	sort: [{
		column: 'cm:userName', 
		ascending: true
	}]
 };

var result = search.query(def);&lt;/PRE&gt;&lt;P&gt;The sort works fine when I "userName" as sort but as soons as I user "firstName" or "email" it fails. If I remove gf;userOrgs from the query it works fine. It gives the following error in the logs:&lt;/P&gt;&lt;PRE&gt;Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 04270500 Request failed 500 /solr/alfresco/afts?wt=json&amp;amp;fl=DBID%2Cscore&amp;amp;rows=100&amp;amp;df=TEXT&amp;amp;start=0&amp;amp;locale=en_US&amp;amp;alternativeDic=DEFAULT_DICTIONARY&amp;amp;sort=cm%3AfirstName+asc&amp;amp;fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&amp;amp;fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON&lt;/PRE&gt;&lt;P&gt;My gf:userOrgs has been defined as an array on the user:&lt;/P&gt;&lt;PRE&gt;Collection
RECEIVERORG
CREATORORG&lt;/PRE&gt;&lt;P&gt;Any help would be appreciated, thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 14:53:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116967#M32378</guid>
      <dc:creator>chrisried</dc:creator>
      <dc:date>2020-05-27T14:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116968#M32379</link>
      <description>&lt;P&gt;Also, I have tried indexing the custom aspect to see if that was the problem:&lt;/P&gt;&lt;PRE&gt;        &amp;lt;aspect name="gf:userOrganizations"&amp;gt;
            &amp;lt;title&amp;gt;User Organizations&amp;lt;/title&amp;gt;

            &amp;lt;properties&amp;gt;
                &amp;lt;property name="gf:userOrgs"&amp;gt;
                    &amp;lt;title&amp;gt;Organizations&amp;lt;/title&amp;gt;
                    &amp;lt;type&amp;gt;d:text&amp;lt;/type&amp;gt;
                    &amp;lt;multiple&amp;gt;true&amp;lt;/multiple&amp;gt;
                    &amp;lt;index enabled="true"&amp;gt;
                        &amp;lt;atomic&amp;gt;true&amp;lt;/atomic&amp;gt;
                        &amp;lt;stored&amp;gt;false&amp;lt;/stored&amp;gt;
                        &amp;lt;tokenised&amp;gt;false&amp;lt;/tokenised&amp;gt;
                        &amp;lt;facetable&amp;gt;true&amp;lt;/facetable&amp;gt;
                    &amp;lt;/index&amp;gt;
                &amp;lt;/property&amp;gt;
            &amp;lt;/properties&amp;gt;
        &amp;lt;/aspect&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 May 2020 14:57:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116968#M32379</guid>
      <dc:creator>chrisried</dc:creator>
      <dc:date>2020-05-27T14:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116969#M32380</link>
      <description>&lt;P&gt;Try query as: 'TYPE:"cm&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;\\:&lt;/STRONG&gt;&lt;/FONT&gt;person" AND &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;@&lt;/FONT&gt;&lt;/STRONG&gt;gf&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;\\&lt;/STRONG&gt;&lt;/FONT&gt;:userOrgs:RECEIVERORG'&lt;/P&gt;
&lt;PRE&gt;var def = {
	query: 'TYPE:"cm&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;\\:&lt;/STRONG&gt;&lt;/FONT&gt;person" AND &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;@&lt;/FONT&gt;&lt;/STRONG&gt;gf&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;\\&lt;/STRONG&gt;&lt;/FONT&gt;:userOrgs:RECEIVERORG',
	store: "workspace://SpacesStore",
	language: "fts-alfresco",
	page: {
		maxItems: 100,
		skipCount: 0
	},
	sort: [{
		column: 'cm:userName', 
		ascending: true
	}]
 };

var result = search.query(def);&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 May 2020 18:10:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116969#M32380</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-05-27T18:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116970#M32381</link>
      <description>&lt;P&gt;Nope, I am still getting the same error.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 15:17:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116970#M32381</guid>
      <dc:creator>chrisried</dc:creator>
      <dc:date>2020-05-28T15:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116971#M32382</link>
      <description>&lt;P&gt;Can you try running this query in node browser and see what you get:&lt;/P&gt;
&lt;PRE&gt;'TYPE:"cm\\:person" AND&amp;nbsp;@gf\\:userOrgs:RECEIVERORG'&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 May 2020 16:20:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116971#M32382</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-05-28T16:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116972#M32383</link>
      <description />
      <pubDate>Fri, 29 May 2020 18:50:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116972#M32383</guid>
      <dc:creator>chrisried</dc:creator>
      <dc:date>2020-05-29T18:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116973#M32384</link>
      <description>&lt;P&gt;Running&lt;/P&gt;&lt;P&gt;'TYPE:"cm\\&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;erson" AND @gf\\:userOrgs:RECEIVERORG' gives "No Items found" while running&lt;/P&gt;&lt;P&gt;TYPE:"cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;erson" AND @gf:userOrgs:RECEIVERORG returns the appropriate results&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 18:53:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116973#M32384</guid>
      <dc:creator>chrisried</dc:creator>
      <dc:date>2020-05-29T18:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116974#M32385</link>
      <description>&lt;P&gt;Sorry these are the correct queries:&lt;/P&gt;&lt;PRE&gt;'TYPE:"cm\\:person" AND @gf\\:userOrgs:RECEIVERORG'
TYPE:"cm:person" AND @gf:userOrgs:RECEIVERORG&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 May 2020 18:56:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116974#M32385</guid>
      <dc:creator>chrisried</dc:creator>
      <dc:date>2020-05-29T18:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116975#M32386</link>
      <description>&lt;P&gt;The query i shared is the same query you posted here. When you execute it via js, you have to escape the characters.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 19:27:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116975#M32386</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-05-29T19:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116976#M32387</link>
      <description>&lt;P&gt;SO there no results when running this query:&lt;/P&gt;&lt;PRE&gt;'TYPE:"cm:person" AND @gf:userOrgs:ORG1'&lt;/PRE&gt;&lt;P&gt;This is incorrect, I can see this aspect on the user:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-06-10 at 12.57.29 PM.png" style="width: 736px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/673iA6D254CAFE4D4C72/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2020 19:00:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116976#M32387</guid>
      <dc:creator>chrisried</dc:creator>
      <dc:date>2020-06-10T19:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting error when using fts-alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116977#M32388</link>
      <description>&lt;P&gt;I believe this is the solution. &lt;A href="https://angelborroy.wordpress.com/2020/05/22/sorting-users-by-firstname-and-lastname-fields-in-alfresco-6/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://angelborroy.wordpress.com/2020/05/22/sorting-users-by-firstname-and-lastname-fields-in-alfresco-6/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 14:37:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/sorting-error-when-using-fts-alfresco/m-p/116977#M32388</guid>
      <dc:creator>chrisried</dc:creator>
      <dc:date>2020-06-18T14:37:09Z</dc:date>
    </item>
  </channel>
</rss>

