From oak-issues-return-69778-archive-asf-public=cust-asf.ponee.io@jackrabbit.apache.org Wed Apr 3 13:10:05 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 11C36180600 for ; Wed, 3 Apr 2019 15:10:04 +0200 (CEST) Received: (qmail 58911 invoked by uid 500); 3 Apr 2019 13:10:04 -0000 Mailing-List: contact oak-issues-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-issues@jackrabbit.apache.org Received: (qmail 58897 invoked by uid 99); 3 Apr 2019 13:10:04 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Apr 2019 13:10:04 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A6E80E0016 for ; Wed, 3 Apr 2019 13:10:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 65EBB24593 for ; Wed, 3 Apr 2019 13:10:03 +0000 (UTC) Date: Wed, 3 Apr 2019 13:10:03 +0000 (UTC) From: "Vikas Saurabh (JIRA)" To: oak-issues@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OAK-8166) Index definition with orderable property definitions with and without functions breaks index MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OAK-8166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16808701#comment-16808701 ] Vikas Saurabh commented on OAK-8166: ------------------------------------ [~nitigup], imo, the underlying issue is that field_name(ordered(function(name)) shouldn't collide with field_name(ordered(name)). I haven't seen the patch yet but what you're fixing should've impacted non-relative properties too (e.g.). Maybe you should see why function over relative property aren't generating a unique name for ordered field. > Index definition with orderable property definitions with and without functions breaks index > -------------------------------------------------------------------------------------------- > > Key: OAK-8166 > URL: https://issues.apache.org/jira/browse/OAK-8166 > Project: Jackrabbit Oak > Issue Type: Bug > Components: indexing > Affects Versions: 1.8.12 > Reporter: Tom Blackford > Priority: Major > Attachments: OAK-8166_1.patch > > > If an index definition contains the same orderable property with and without functions, it will fail to index any node which contains that property. The failure will be logged as [1]. > Steps to reproduce: > * Configure index with the two property definitions shown at [2]. > * Refresh the index definition > * Modify a node that falls under the definition - it will fail with the exception shown at [1] > * Modify the 'non-function' index definition to not be orderable (orderable=false) > * Refresh the index definition > * Modify the same node - note there is no exception. > Thanks to [~catholicon] for assistance identifying root cause. > [1] > {code} > 25.03.2019 15:39:04.135 *WARN* [async-index-update-async] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor Failed to index the node [/content/dam/Unknown-2.png] > java.lang.IllegalArgumentException: DocValuesField ":dvjcr:content/metadata/dc:title" appears more than once in this document (only one value is allowed per field) > at org.apache.lucene.index.SortedDocValuesWriter.addValue(SortedDocValuesWriter.java:62) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.lucene.index.DocValuesProcessor.addSortedField(DocValuesProcessor.java:125) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.lucene.index.DocValuesProcessor.addField(DocValuesProcessor.java:59) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.lucene.index.TwoStoredFieldsConsumers.addField(TwoStoredFieldsConsumers.java:36) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.lucene.index.DocFieldProcessor.processDocument(DocFieldProcessor.java:236) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:253) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:455) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1534) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1507) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.jackrabbit.oak.plugins.index.lucene.writer.DefaultIndexWriter.updateDocument(DefaultIndexWriter.java:86) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(LuceneIndexEditor.java:258) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:140) [org.apache.jackrabbit.oak-lucene:1.8.9] > at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.leave(CompositeEditor.java:74) [org.apache.jackrabbit.oak-store-spi:1.8.9] > {code} > [2] > {code} > "dcTitle": { > "jcr:primaryType": "nt:unstructured", > "nodeScopeIndex": "true", > "useInSuggest": "true", > "ordered": "true", > "propertyIndex": "true", > "useInSpellcheck": "true", > "name": "jcr:content/metadata/dc:title", > "boost": "2.0" > }, > "dcTitleLowercase": { > "jcr:primaryType": "nt:unstructured", > "ordered": "true", > "propertyIndex": "true", > "function": "fn:lower-case(jcr:content/metadata/@dc:title)" > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)