[ 
https://issues.apache.org/jira/browse/OAK-12435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Mueller updated OAK-12435:
---------------------------------
    Description: 
h1. Problem

Oak's Elasticsearch backend hard-codes the Elasticsearch keyword mapping 
parameter {{ignore_above}} to 256. Index definitions cannot currently override 
this value.

This introduces backend-dependent query results for string properties that 
exceed 256 characters but remain well below Lucene's term-size limit. In 
particular, equality and IS NOT NULL queries can miss nodes with values that 
the Lucene backend can index.

ignore_above is an Elasticsearch mapping parameter, not an existing Oak 
index-definition option. The requested improvement is to expose it through 
Oak's index definition.
h1. Proposal

Introduce a documented, per-property index-definition setting, for example 
ignoreAbove. This name is proposed, not an existing option.
{code:java}
/oak:index/example
  type = "elasticsearch"
  indexRules
    nt:base
      properties
        description
          name = "description"
          propertyIndex = true
          notNullCheckEnabled = true
          ignoreAbove = 1024
{code}
The mapping builder should read this setting and generate ignore_above: 1024 
for that property's keyword mapping.

----

For queries that check for property existence, we can change the elasticsearch 
query to return document that have the "_ignored" field, see also 
https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-ignored-field
 -- that way, there is no need to add notNullCheckEnabled fields.

  was:
h1. Problem

Oak's Elasticsearch backend hard-codes the Elasticsearch keyword mapping 
parameter {{ignore_above}} to 256. Index definitions cannot currently override 
this value.

This introduces backend-dependent query results for string properties that 
exceed 256 characters but remain well below Lucene's term-size limit. In 
particular, equality and IS NOT NULL queries can miss nodes with values that 
the Lucene backend can index.

ignore_above is an Elasticsearch mapping parameter, not an existing Oak 
index-definition option. The requested improvement is to expose it through 
Oak's index definition.
h1. Proposal

Introduce a documented, per-property index-definition setting, for example 
ignoreAbove. This name is proposed, not an existing option.
{code:java}
/oak:index/example
  type = "elasticsearch"
  indexRules
    nt:base
      properties
        description
          name = "description"
          propertyIndex = true
          notNullCheckEnabled = true
          ignoreAbove = 1024
{code}
The mapping builder should read this setting and generate ignore_above: 1024 
for that property's keyword mapping.

For queries that check for property existence, we can change the elasticsearch 
query to return document that have the "_ignored" field.


> Elasticsearch: make ignore_above configurable, and change "is not null" 
> queries to return ignored documents
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-12435
>                 URL: https://issues.apache.org/jira/browse/OAK-12435
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Benjamin Habegger
>            Priority: Major
>
> h1. Problem
> Oak's Elasticsearch backend hard-codes the Elasticsearch keyword mapping 
> parameter {{ignore_above}} to 256. Index definitions cannot currently 
> override this value.
> This introduces backend-dependent query results for string properties that 
> exceed 256 characters but remain well below Lucene's term-size limit. In 
> particular, equality and IS NOT NULL queries can miss nodes with values that 
> the Lucene backend can index.
> ignore_above is an Elasticsearch mapping parameter, not an existing Oak 
> index-definition option. The requested improvement is to expose it through 
> Oak's index definition.
> h1. Proposal
> Introduce a documented, per-property index-definition setting, for example 
> ignoreAbove. This name is proposed, not an existing option.
> {code:java}
> /oak:index/example
>   type = "elasticsearch"
>   indexRules
>     nt:base
>       properties
>         description
>           name = "description"
>           propertyIndex = true
>           notNullCheckEnabled = true
>           ignoreAbove = 1024
> {code}
> The mapping builder should read this setting and generate ignore_above: 1024 
> for that property's keyword mapping.
> ----
> For queries that check for property existence, we can change the 
> elasticsearch query to return document that have the "_ignored" field, see 
> also 
> https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-ignored-field
>  -- that way, there is no need to add notNullCheckEnabled fields.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to