<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:09:18 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[FOLIO-921] Handling array structures in PostgreSQL JSON objects</title>
                <link>https://folio-org.atlassian.net/browse/FOLIO-921</link>
                <project id="10290" key="FOLIO">FOLIO</project>
                    <description>&lt;p&gt;We may have some challenges with FOLIO records containing repeated fields, represented as array of either strings or complex objects, within the main JSON object. &lt;/p&gt;

&lt;p&gt;The issues pertain to searching, sorting and data integrity and includes potential performance issues with either of these requirements. &lt;/p&gt;

&lt;p&gt;The use of repeated fields is especially prevalent in the &quot;Instance&quot; record at this point, I believe. It has around 20 fields with three quarters of them being repeatable. &lt;/p&gt;

&lt;p&gt;The spec for &quot;Instance&quot; (work in progress):  &lt;a href=&quot;https://github.com/folio-org/mod-inventory-storage/blob/MODINV24-from-v-5-1-1/ramls/instance.json&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/folio-org/mod-inventory-storage/blob/MODINV24-from-v-5-1-1/ramls/instance.json&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example of an instance:  &lt;a href=&quot;https://github.com/folio-org/mod-inventory-storage/blob/MODINV24-from-v-5-1-1/sample-data/instances/transparent-water.json&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/folio-org/mod-inventory-storage/blob/MODINV24-from-v-5-1-1/sample-data/instances/transparent-water.json&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some of the repeated fields are arrays of simple strings so far (subjects, notes), some are arrays of simple strings that serves as foreign key identifiers (languages), but most are multi-property objects with their own foreign key identifiers, like &apos;creators&apos;, &apos;classifications&apos;, &apos;identifiers&apos;. &lt;/p&gt;
</description>
                <environment></environment>
        <key id="80503">FOLIO-921</key>
            <summary>Handling array structures in PostgreSQL JSON objects</summary>
                <type id="10003" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium">Task</type>
                                            <priority id="10001" iconUrl="https://dev.folio.org/assets/jira-priority/jira-p2.svg">P2</priority>
                        <status id="6" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10003">Done</resolution>
                                                        <assignee accountid="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c">shale99</assignee>
                                                                <reporter accountid="5bffed5e2434bf3a1a91d37a">Niels Erik Nielsen</reporter>
                                    <labels>
                            <label>core</label>
                            <label>sprint26</label>
                            <label>sprint28</label>
                    </labels>
                <created>Fri, 3 Nov 2017 10:22:26 +0000</created>
                <updated>Mon, 28 Jan 2019 17:11:27 +0000</updated>
                            <resolved>Wed, 13 Dec 2017 14:12:14 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                    <timespent seconds="9000">2 hours, 30 minutes</timespent>
                                                                    <aggregatetimespent seconds="9000">2 hours, 30 minutes</aggregatetimespent>
                                    <comments>
                                                            <comment id="190622" author="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d" created="Tue, 5 Dec 2017 14:25:13 +0000"  >&lt;p&gt;Array searching workaround: &lt;a href=&quot;https://github.com/folio-org/cql2pgjson-java&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/folio-org/cql2pgjson-java&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;language = \&quot;en\&quot;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;For array of objects:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;contributor = &quot;\&quot;value\&quot; : \&quot;xxx\&quot;&quot;&lt;/tt&gt;&lt;/p&gt;</comment>
                                                            <comment id="190624" author="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d" created="Tue, 5 Dec 2017 14:26:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=712020%3A32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; class=&quot;user-hover&quot; rel=&quot;712020:32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; data-account-id=&quot;712020:32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; accountid=&quot;712020:32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; rel=&quot;noreferrer&quot;&gt;shale99&lt;/a&gt; can you please check if the above will use an index, if not what can be done to support it.&lt;/p&gt;</comment>
                                                            <comment id="190626" author="5ee89462f7aa140abd82d11d" created="Tue, 5 Dec 2017 14:29:09 +0000"  >&lt;p&gt;For array of objects: (removed one space)&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;contributor = &quot;\&quot;value\&quot;: \&quot;xxx\&quot;&quot;&lt;/tt&gt;&lt;/p&gt;</comment>
                                                            <comment id="190627" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Wed, 6 Dec 2017 12:03:25 +0000"  >&lt;p&gt;correct me if i am missing something, the above generates an AND query looking for &quot;value&quot;: AND &quot;xxx&quot; in the contributor field - no ordering, meaning theoretically we can get back (although unlikely)&lt;br/&gt;
&quot;contributor&quot;: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;anyfield&amp;quot;: &amp;quot;asd asasd \&amp;quot;value\&amp;quot;&amp;quot; , &amp;quot;anyfield2&amp;quot;: &amp;quot;\xxx\&amp;quot;&amp;quot;&amp;#93;&lt;/span&gt;&lt;br/&gt;
or&lt;br/&gt;
&quot;contributor&quot;: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;value&amp;quot;: &amp;quot;asd asasd&amp;quot; , &amp;quot;xxx&amp;quot;: &amp;quot;asd swwqq&amp;quot;&amp;#93;&lt;/span&gt;&lt;/p&gt;</comment>
                                                            <comment id="190630" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Wed, 6 Dec 2017 12:04:26 +0000"  >&lt;p&gt;from a trimming standpoint:&lt;br/&gt;
the value must have at least one space before it, key does not. for example&lt;/p&gt;

&lt;p&gt;GOOD&lt;br/&gt;
query=creators=\&quot;name\&quot;: \&quot;ari*\&quot; &lt;br/&gt;
query=creators=\&quot;name\&quot; : \&quot;ari*\&quot; &lt;br/&gt;
query=creators=\&quot;name\&quot;  :  \&quot;ari*\&quot; &lt;/p&gt;

&lt;p&gt;BAD - query=creators=\&quot;name\&quot; :\&quot;ari*\&quot;  - unless we are looking for a value that starts with ari , in which case this will be ok - this will not find an \&quot;ari\&quot; in the value - once again, this may be ok, but just need to be aware&lt;/p&gt;</comment>
                                                            <comment id="190632" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Wed, 6 Dec 2017 12:36:55 +0000"  >&lt;p&gt;trigram gin index is used&lt;/p&gt;</comment>
                                                            <comment id="190633" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Wed, 6 Dec 2017 12:51:58 +0000"  >&lt;p&gt;if we are ok with the above, seems reasonable at this stage, unless there are use cases which require more exact searching, i  think we can close this?&lt;/p&gt;</comment>
                                                            <comment id="190635" author="5ee89462f7aa140abd82d11d" created="Wed, 6 Dec 2017 15:58:06 +0000"  >&lt;p&gt;&lt;tt&gt;contributor adj &quot;\&quot;value\&quot;: \&quot;xxx\&quot;&quot;&lt;/tt&gt; is the way to go.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;contributor = &quot;\&quot;value\&quot;: \&quot;xxx\&quot;&quot;&lt;/tt&gt; contains two words that can match at any position so it matches&lt;br/&gt;
&quot;contributor&quot;: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;anyfield&amp;quot;: &amp;quot;xxx&amp;quot;, &amp;quot;value&amp;quot;: &amp;quot;asd asasd&amp;quot;&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;adj enforces consecutive matching.&lt;/p&gt;</comment>
                                                            <comment id="190637" author="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d" created="Wed, 13 Dec 2017 14:12:14 +0000"  >&lt;p&gt;Closing, let&apos;s make sure we have added the notes in the CQL2PG README &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=712020%3A32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; class=&quot;user-hover&quot; rel=&quot;712020:32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; data-account-id=&quot;712020:32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; accountid=&quot;712020:32bb56ac-50e7-4787-b4af-ed3089d9401c&quot; rel=&quot;noreferrer&quot;&gt;shale99&lt;/a&gt; &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5ee89462f7aa140abd82d11d&quot; class=&quot;user-hover&quot; rel=&quot;5ee89462f7aa140abd82d11d&quot; data-account-id=&quot;5ee89462f7aa140abd82d11d&quot; accountid=&quot;5ee89462f7aa140abd82d11d&quot; rel=&quot;noreferrer&quot;&gt;Julian Ladisch&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="77828">MODCXINV-7</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="46736">UIIN-3</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                            <subtask id="80500">FOLIO-922</subtask>
                            <subtask id="79369">FOLIO-923</subtask>
                            <subtask id="79371">FOLIO-924</subtask>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzy2d3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 5 Dec 2017 14:25:13 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10025" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>[CHART] Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>