<?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: How can I add a number field to the fulltext search? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-add-a-number-field-to-the-fulltext-search/m-p/321323#M8324</link>
    <description>&lt;P&gt;Hi Gregory,&lt;/P&gt;
&lt;P&gt;sorry for the late reply. Did not have the time to look into that until now.
Actually, I am not using Elasticsearch, but Postgres' full-text search would be enough for me.
Unfortunately, it seems that Nuxeo ignores fields that are not of type string or binary (c.f. FulltextConfigurationFactory.java:176). At least that's my conclusion after getting a&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;ERROR [FulltextConfigurationFactory] Ignoring property 'datacite:year' with bad type org.nuxeo.ecm.core.schema.types.primitives.LongType@8b41ad in fulltext configuration: year
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(datacite:year is a custom field of ours)&lt;/P&gt;
&lt;P&gt;My overall goal is to be able to search by year but also in a combined search term like "contract 2020".
Do you have any ideas on how to accomplish that?&lt;/P&gt;
&lt;P&gt;Best,
Konrad&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jul 2022 19:26:18 GMT</pubDate>
    <dc:creator>Konrad_Krenzlin</dc:creator>
    <dc:date>2022-07-20T19:26:18Z</dc:date>
    <item>
      <title>How can I add a number field to the fulltext search?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-add-a-number-field-to-the-fulltext-search/m-p/321321#M8322</link>
      <description>&lt;P&gt;It seems that Nuxeo is only using string fields to build the &lt;CODE&gt;fulltext&lt;/CODE&gt; . Maybe using the &lt;CODE&gt;fulltextExcludedTypes&lt;/CODE&gt; but I cannot find it anywhere being set.&lt;/P&gt;
&lt;P&gt;Is there a way I can incorporate number fields, e.g. a year, into the fulltext index? Or specifiy the fields that will go into?&lt;/P&gt;
&lt;P&gt;Update: I am using VCS with Postgres&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 09:51:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-add-a-number-field-to-the-fulltext-search/m-p/321321#M8322</guid>
      <dc:creator>Konrad_Krenzlin</dc:creator>
      <dc:date>2022-04-22T09:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add a number field to the fulltext search?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-add-a-number-field-to-the-fulltext-search/m-p/321322#M8323</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;You should adapt the Elasticsearch mapping as described here: &lt;A href="https://doc.nuxeo.com/nxdoc/configuring-the-elasticsearch-mapping/#includeexcluding-a-field-from-the-full-text-search" target="test_blank"&gt;https://doc.nuxeo.com/nxdoc/configuring-the-elasticsearch-mapping/#includeexcluding-a-field-from-the-full-text-search&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As you correctly pointed out, the default full text field only indexes text fields&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 20:04:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-add-a-number-field-to-the-fulltext-search/m-p/321322#M8323</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2022-04-26T20:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add a number field to the fulltext search?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-add-a-number-field-to-the-fulltext-search/m-p/321323#M8324</link>
      <description>&lt;P&gt;Hi Gregory,&lt;/P&gt;
&lt;P&gt;sorry for the late reply. Did not have the time to look into that until now.
Actually, I am not using Elasticsearch, but Postgres' full-text search would be enough for me.
Unfortunately, it seems that Nuxeo ignores fields that are not of type string or binary (c.f. FulltextConfigurationFactory.java:176). At least that's my conclusion after getting a&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;ERROR [FulltextConfigurationFactory] Ignoring property 'datacite:year' with bad type org.nuxeo.ecm.core.schema.types.primitives.LongType@8b41ad in fulltext configuration: year
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(datacite:year is a custom field of ours)&lt;/P&gt;
&lt;P&gt;My overall goal is to be able to search by year but also in a combined search term like "contract 2020".
Do you have any ideas on how to accomplish that?&lt;/P&gt;
&lt;P&gt;Best,
Konrad&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 19:26:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-add-a-number-field-to-the-fulltext-search/m-p/321323#M8324</guid>
      <dc:creator>Konrad_Krenzlin</dc:creator>
      <dc:date>2022-07-20T19:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add a number field to the fulltext search?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-add-a-number-field-to-the-fulltext-search/m-p/321324#M8325</link>
      <description>&lt;P&gt;For anybody interested: I ended up using a hidden schema text field storing the int year as a string. Because it is a text, it is added to the fulltext search. I use a listener to update that field on any &lt;CODE&gt;beforeDocumentModification&lt;/CODE&gt; event&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 13:52:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-add-a-number-field-to-the-fulltext-search/m-p/321324#M8325</guid>
      <dc:creator>Konrad_Krenzlin</dc:creator>
      <dc:date>2022-12-15T13:52:19Z</dc:date>
    </item>
  </channel>
</rss>

