Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25333

Fix custom property for fulltext

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 9.10, 10.10
    • Fix Version/s: None
    • Component/s: Elasticsearch
    • Environment:
      Linux

      Description

      I'm trying to make a custom text field searchable by fulltext. I have created a custom schema with one property "my:string" of type "String". I have configured a custom template (as per https://doc.nuxeo.com/nxdoc/elasticsearch-setup/#changingelasticsearchmapping). I have created the file:
      server/templates/myapp/nxserver/config/elasticsearch-doc-mapping.json
      containing:

      {
        "properties": {
          "my:string": {
            "type": "keyword",
            "copy_to": "all_field",
            "fields": {
              "fulltext": {
                "analyzer": "fulltext",
                "type": "text"
              }
            }
          }
        }
      }
      

      (as per https://doc.nuxeo.com/nxdoc/configuring-the-elasticsearch-mapping/#adding-a-new-full-text-field) but am getting the following error (after restarting and full reindex):

      Failed to execute phase [dfs], all shards failed; shardFailures {[0AvQrU9TQBGfcUhy5RnyAQ][nuxeo][0]: RemoteTransportException[[nuxeo1][10.0.2.15:9300][indices:data/read/search[phase/dfs]]]; nested: IllegalArgumentException[Fielddata is disabled on text fields by default. Set fielddata=true on [vision:labels.text] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.
      Fielddata is disabled on text fields by default. Set fielddata=true on [vision:labels.text] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.]
      

      Note the second message is related to a different property that I have not configured (nor using for searching).

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h