java.lang.IllegalArgumentException: dimension "ipc.parent.class" is not multiValued, but it appears more than once in this document

Hibernate JIRA | Michael Shekhtman | 1 year ago
  1. 0

    I'm getting this error when batch indexing: dimension "ipc.parent.class" is not multiValued, but it appears more than once in this document {noformat} 15:06:20.942 [Hibernate Search: entityloader-1] ERROR o.h.s.exception.impl.LogErrorHandler - HSEARCH000058: HSEARCH000183: Unable to index instance of type com.patentsearch.model.patent.Patent while batch indexing: com.patentsearch.model.patent.Patent@687a5ab0[id=131,title=[com.patentsearch.model.patent.PatentTitle@5dd2f761[id=277,title=A MULTI-LEVEL CONTROLLER SYSTEM,language=<null>]],applicants=[com.patentsearch.model.PatentInitiator@37f7915c[id=298,name=ELTON BAUMGARTEN,country=<null>,address=,displayName=BAUMGARTEN ELTON,patentsCount=1]],authors=[com.patentsearch.model.PatentInitiator@3027a98d[id=348,name=LATROBE,PIERRE-MICHEL-LOUIS,country=FRANCE [FR],address=,displayName=PIERRE-MICHEL-LOUIS LATROBE,patentsCount=1], com.patentsearch.model.PatentInitiator@7a043053[id=247,name=Hisco, Inc.,country=USA [US],address=Houston,TX,displayName=HISCO INC,patentsCount=1], com.patentsearch.model.PatentInitiator@ab2dae3[id=1232,name=OPARIN ALEKSEJ V,SU,country=SOVIET UNION [SU],address=,displayName=OPARIN ALEKSEJ V,patentsCount=1], com.patentsearch.model.PatentInitiator@cc72b40[id=62,name=SIMON, Dirk,country=GERMANY [DE],address=Alemannenweg 20,79541 Lörrach,displayName=SIMON DIRK,patentsCount=1], com.patentsearch.model.PatentInitiator@b5da881[id=236,name=Park, Ki-Shic,country=REPUBLIC OF KOREA [KR],address=Daejeon,displayName=PARK KI-SHIC,patentsCount=1]],ipc=[Classification{code='G05B19/042', description='using digital processors', level=10}, Classification{code='G01N15/14', description='Electro-optical investigation, e.g. flow cytometers', level=9}, Classification{code='G05B19/045', description='using logic state machines, consisting only of a memory or a programmable logic device containing the logic for the controlled machine and in which the state of its outputs is dependent on the state of its inputs or part of its own output states, e.g. binary decision controllers, finite state controllers', level=10}, Classification{code='G05B11/01', description='electric', level=8}, Classification{code='G01N35/10', description='Devices for transferring samples', level=8}],familyId=32329160,trace=[com.patentsearch.model.patent.PatentTrace@3cda9f35[id=132,number=03768993,kind=null [A,EP],recordDate=2003-11-17T19:00:00.000-05:00,processed=2015-08-28T21:45:44.700-04:00], com.patentsearch.model.patent.PatentTrace@535ed25c[id=497,number=1565795,kind=Application published with search report [A1,EP],recordDate=2005-08-23T20:00:00.000-04:00,processed=2015-08-28T21:46:07.164-04:00], com.patentsearch.model.patent.PatentTrace@22dcf8cd[id=496,number=1565795,kind=Supplementary search report [A4,EP],recordDate=2006-11-14T19:00:00.000-05:00,processed=2015-08-28T21:46:07.162-04:00], com.patentsearch.model.patent.PatentTrace@44254057[id=495,number=1565795,kind=Patent specification [B1,EP],recordDate=2008-11-11T19:00:00.000-05:00,processed=2015-08-28T21:46:07.159-04:00]]] java.lang.IllegalArgumentException: dimension "ipc.parent.class" is not multiValued, but it appears more than once in this document at org.apache.lucene.facet.FacetsConfig.checkSeen(FacetsConfig.java:175) ~[lucene-facet-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:39:07] at org.apache.lucene.facet.FacetsConfig.build(FacetsConfig.java:232) ~[lucene-facet-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:39:07] at org.apache.lucene.facet.FacetsConfig.build(FacetsConfig.java:190) ~[lucene-facet-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:39:07] at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.getDocument(DocumentBuilderIndexedEntity.java:362) ~[hibernate-search-engine-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.createAddWork(DocumentBuilderIndexedEntity.java:250) ~[hibernate-search-engine-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.index(IdentifierConsumerDocumentProducer.java:283) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.indexAllQueue(IdentifierConsumerDocumentProducer.java:223) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadList(IdentifierConsumerDocumentProducer.java:177) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadAllFromQueue(IdentifierConsumerDocumentProducer.java:140) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.run(IdentifierConsumerDocumentProducer.java:117) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_60] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60] {noformat} {code:java} @Entity @DynamicInsert @DynamicUpdate @Table(name = "PATENT") @SequenceGenerator(name = "hibernate_sequence", sequenceName = "hibernate_sequence", initialValue = 1, allocationSize = 50) @Indexed @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) @AnalyzerDefs(value = { @AnalyzerDef(name = "titleAnalyzer", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = { @TokenFilterDef(factory = LowerCaseFilterFactory.class), @TokenFilterDef(factory = StopFilterFactory.class), @TokenFilterDef(factory = SnowballPorterFilterFactory.class, params = { @Parameter(name = "language", value = "English") }) }), @AnalyzerDef(name = "applicantsAnalyzer", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = { @TokenFilterDef(factory = LowerCaseFilterFactory.class), @TokenFilterDef(factory = StopFilterFactory.class), @TokenFilterDef(factory = SynonymFilterFactory.class, params = { @Parameter(name = "synonyms", value = "syn.txt") }) }) }) public class Patent implements Serializable { private static final long serialVersionUID = 2875548131187739523L; @Id @Column(name = "ID") @GeneratedValue(generator = "hibernate_sequence", strategy = GenerationType.SEQUENCE) @DocumentId private Long id; @Column(name = "EPO_ID", unique = true, nullable = true) private Long epoId; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "PATENT_ID", referencedColumnName = "ID") @IndexedEmbedded private Set<PatentTitle> title; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "PATENT_ID", referencedColumnName = "ID") private Set<PatentDescription> description; @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}) @JoinTable(name = "PATENT_APPLICANT", joinColumns = @JoinColumn(name = "PATENT_ID"), inverseJoinColumns = @JoinColumn(name = "APPLICANT_ID") ) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) @OrderColumn(name = "applicant_seq") @IndexedEmbedded private List<PatentInitiator> applicants; @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}) @JoinTable(name = "PATENT_INVENTOR", joinColumns = @JoinColumn(name = "PATENT_ID"), inverseJoinColumns = @JoinColumn(name = "AUTHOR_ID") ) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) @OrderColumn(name = "author_seq") @IndexedEmbedded private List<PatentInitiator> authors; @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) @JoinTable(name = "PATENT_CLASS", joinColumns = @JoinColumn(name = "PATENT_ID"), inverseJoinColumns = @JoinColumn(name = "ID")) @IndexedEmbedded private Set<Classification> ipc; @Column(name = "FAMILY_ID", length = 20) private Long familyId; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "PATENT_ID", referencedColumnName = "ID") @OrderBy("recordDate ASC") @Fields({ @Field(name = "trace.number", store = Store.YES, analyze = Analyze.NO, bridge = @FieldBridge(impl = PatentTraceNumberBridge.class)), @Field(name = "trace.fillingDate", store = Store.YES, analyze = Analyze.NO, bridge = @FieldBridge(impl = PatentTraceFillingDateBridge.class)), @Field(name = "trace.lastRecordDate", store = Store.YES, analyze = Analyze.NO, bridge = @FieldBridge(impl = PatentTraceLastRecordDateBridge.class)), }) @Fetch(FetchMode.SUBSELECT) @IndexedEmbedded private List<PatentTrace> trace; public List<PatentInitiator> getApplicants() { return applicants; } public void setApplicants(List<PatentInitiator> applicants) { this.applicants = applicants; } public List<PatentInitiator> getAuthors() { return authors; } public void setAuthors(List<PatentInitiator> authors) { this.authors = authors; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getEpoId() { return epoId; } public void setEpoId(Long epoId) { this.epoId = epoId; } public Set<PatentTitle> getTitle() { return title; } public void setTitle(Set<PatentTitle> title) { this.title = title; } public Set<PatentDescription> getDescription() { return description; } public void setDescription(Set<PatentDescription> description) { this.description = description; } public Set<Classification> getIpc() { return ipc; } public void setIpc(Set<Classification> ipc) { this.ipc = ipc; } public List<PatentTrace> getTrace() { return trace; } public void setTrace(List<PatentTrace> trace) { this.trace = trace; } public Long getFamilyId() { return familyId; } public void setFamilyId(Long familyId) { this.familyId = familyId; } public void initialize() { if (title == null) { title = new HashSet<>(); } if (description == null) { description = new HashSet<>(); } if (ipc == null) { ipc = new HashSet<>(); } if (applicants == null) { applicants = new LinkedList<>(); } if (authors == null) { authors = new LinkedList<>(); } } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } Patent rhs = (Patent) obj; return new EqualsBuilder() .append(this.title, rhs.title) .append(this.applicants, rhs.applicants) .append(this.authors, rhs.authors) .append(this.ipc, rhs.ipc) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder() .append(title) .append(applicants) .append(authors) .append(ipc) .toHashCode(); } @Override public String toString() { return new ToStringBuilder(this) .append("id", id) .append("title", title) .append("applicants", applicants) .append("authors", authors) .append("ipc", ipc) .append("familyId", familyId) .append("trace", trace) .toString(); } {code} {code:java} @Entity @DynamicInsert @DynamicUpdate @Table(name = "CLASSIFICATION", uniqueConstraints = @UniqueConstraint(columnNames = {"CLASS_CODE"})) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) public class Classification implements Serializable { private static final long serialVersionUID = -3092795599286682284L; @Id @Column(name = "CLASS_CODE", length = 15) @Field(name = "class", store = Store.YES, analyze = Analyze.NO) @Facet(forField = "class") private String code; @Column(name = "DESCRIPTION", length = 1000) private String description; @Column(name = "LEVEL") private Integer level; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "PARENT") @IndexedEmbedded(depth = 1) private Classification parent; @OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, fetch = FetchType.LAZY) private Set<Classification> children; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Integer getLevel() { return level; } public void setLevel(Integer level) { this.level = level; } public Classification getParent() { return parent; } public void setParent(Classification parent) { this.parent = parent; } public Set<Classification> getChildren() { return children; } public void setChildren(Set<Classification> children) { this.children = children; } @Override public int hashCode() { return new HashCodeBuilder() .append(this.code) .toHashCode(); } @Override public boolean equals(Object other) { if (other == null) { return false; } if (other == this) { return true; } if (other.getClass() != this.getClass()) { return false; } Classification that = (Classification) other; return new EqualsBuilder() .append(this.code, that.code) .isEquals(); } @Override public String toString() { return "Classification{" + "code='" + code + '\'' + ", description='" + description + '\'' + ", level=" + level + '}'; } } {code}

    Hibernate JIRA | 1 year ago | Michael Shekhtman
    java.lang.IllegalArgumentException: dimension "ipc.parent.class" is not multiValued, but it appears more than once in this document
  2. 0

    I'm getting this error when batch indexing: dimension "ipc.parent.class" is not multiValued, but it appears more than once in this document {noformat} 15:06:20.942 [Hibernate Search: entityloader-1] ERROR o.h.s.exception.impl.LogErrorHandler - HSEARCH000058: HSEARCH000183: Unable to index instance of type com.patentsearch.model.patent.Patent while batch indexing: com.patentsearch.model.patent.Patent@687a5ab0[id=131,title=[com.patentsearch.model.patent.PatentTitle@5dd2f761[id=277,title=A MULTI-LEVEL CONTROLLER SYSTEM,language=<null>]],applicants=[com.patentsearch.model.PatentInitiator@37f7915c[id=298,name=ELTON BAUMGARTEN,country=<null>,address=,displayName=BAUMGARTEN ELTON,patentsCount=1]],authors=[com.patentsearch.model.PatentInitiator@3027a98d[id=348,name=LATROBE,PIERRE-MICHEL-LOUIS,country=FRANCE [FR],address=,displayName=PIERRE-MICHEL-LOUIS LATROBE,patentsCount=1], com.patentsearch.model.PatentInitiator@7a043053[id=247,name=Hisco, Inc.,country=USA [US],address=Houston,TX,displayName=HISCO INC,patentsCount=1], com.patentsearch.model.PatentInitiator@ab2dae3[id=1232,name=OPARIN ALEKSEJ V,SU,country=SOVIET UNION [SU],address=,displayName=OPARIN ALEKSEJ V,patentsCount=1], com.patentsearch.model.PatentInitiator@cc72b40[id=62,name=SIMON, Dirk,country=GERMANY [DE],address=Alemannenweg 20,79541 Lörrach,displayName=SIMON DIRK,patentsCount=1], com.patentsearch.model.PatentInitiator@b5da881[id=236,name=Park, Ki-Shic,country=REPUBLIC OF KOREA [KR],address=Daejeon,displayName=PARK KI-SHIC,patentsCount=1]],ipc=[Classification{code='G05B19/042', description='using digital processors', level=10}, Classification{code='G01N15/14', description='Electro-optical investigation, e.g. flow cytometers', level=9}, Classification{code='G05B19/045', description='using logic state machines, consisting only of a memory or a programmable logic device containing the logic for the controlled machine and in which the state of its outputs is dependent on the state of its inputs or part of its own output states, e.g. binary decision controllers, finite state controllers', level=10}, Classification{code='G05B11/01', description='electric', level=8}, Classification{code='G01N35/10', description='Devices for transferring samples', level=8}],familyId=32329160,trace=[com.patentsearch.model.patent.PatentTrace@3cda9f35[id=132,number=03768993,kind=null [A,EP],recordDate=2003-11-17T19:00:00.000-05:00,processed=2015-08-28T21:45:44.700-04:00], com.patentsearch.model.patent.PatentTrace@535ed25c[id=497,number=1565795,kind=Application published with search report [A1,EP],recordDate=2005-08-23T20:00:00.000-04:00,processed=2015-08-28T21:46:07.164-04:00], com.patentsearch.model.patent.PatentTrace@22dcf8cd[id=496,number=1565795,kind=Supplementary search report [A4,EP],recordDate=2006-11-14T19:00:00.000-05:00,processed=2015-08-28T21:46:07.162-04:00], com.patentsearch.model.patent.PatentTrace@44254057[id=495,number=1565795,kind=Patent specification [B1,EP],recordDate=2008-11-11T19:00:00.000-05:00,processed=2015-08-28T21:46:07.159-04:00]]] java.lang.IllegalArgumentException: dimension "ipc.parent.class" is not multiValued, but it appears more than once in this document at org.apache.lucene.facet.FacetsConfig.checkSeen(FacetsConfig.java:175) ~[lucene-facet-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:39:07] at org.apache.lucene.facet.FacetsConfig.build(FacetsConfig.java:232) ~[lucene-facet-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:39:07] at org.apache.lucene.facet.FacetsConfig.build(FacetsConfig.java:190) ~[lucene-facet-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:39:07] at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.getDocument(DocumentBuilderIndexedEntity.java:362) ~[hibernate-search-engine-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.createAddWork(DocumentBuilderIndexedEntity.java:250) ~[hibernate-search-engine-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.index(IdentifierConsumerDocumentProducer.java:283) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.indexAllQueue(IdentifierConsumerDocumentProducer.java:223) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadList(IdentifierConsumerDocumentProducer.java:177) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadAllFromQueue(IdentifierConsumerDocumentProducer.java:140) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.run(IdentifierConsumerDocumentProducer.java:117) ~[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_60] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60] {noformat} {code:java} @Entity @DynamicInsert @DynamicUpdate @Table(name = "PATENT") @SequenceGenerator(name = "hibernate_sequence", sequenceName = "hibernate_sequence", initialValue = 1, allocationSize = 50) @Indexed @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) @AnalyzerDefs(value = { @AnalyzerDef(name = "titleAnalyzer", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = { @TokenFilterDef(factory = LowerCaseFilterFactory.class), @TokenFilterDef(factory = StopFilterFactory.class), @TokenFilterDef(factory = SnowballPorterFilterFactory.class, params = { @Parameter(name = "language", value = "English") }) }), @AnalyzerDef(name = "applicantsAnalyzer", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = { @TokenFilterDef(factory = LowerCaseFilterFactory.class), @TokenFilterDef(factory = StopFilterFactory.class), @TokenFilterDef(factory = SynonymFilterFactory.class, params = { @Parameter(name = "synonyms", value = "syn.txt") }) }) }) public class Patent implements Serializable { private static final long serialVersionUID = 2875548131187739523L; @Id @Column(name = "ID") @GeneratedValue(generator = "hibernate_sequence", strategy = GenerationType.SEQUENCE) @DocumentId private Long id; @Column(name = "EPO_ID", unique = true, nullable = true) private Long epoId; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "PATENT_ID", referencedColumnName = "ID") @IndexedEmbedded private Set<PatentTitle> title; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "PATENT_ID", referencedColumnName = "ID") private Set<PatentDescription> description; @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}) @JoinTable(name = "PATENT_APPLICANT", joinColumns = @JoinColumn(name = "PATENT_ID"), inverseJoinColumns = @JoinColumn(name = "APPLICANT_ID") ) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) @OrderColumn(name = "applicant_seq") @IndexedEmbedded private List<PatentInitiator> applicants; @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}) @JoinTable(name = "PATENT_INVENTOR", joinColumns = @JoinColumn(name = "PATENT_ID"), inverseJoinColumns = @JoinColumn(name = "AUTHOR_ID") ) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) @OrderColumn(name = "author_seq") @IndexedEmbedded private List<PatentInitiator> authors; @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) @JoinTable(name = "PATENT_CLASS", joinColumns = @JoinColumn(name = "PATENT_ID"), inverseJoinColumns = @JoinColumn(name = "ID")) @IndexedEmbedded private Set<Classification> ipc; @Column(name = "FAMILY_ID", length = 20) private Long familyId; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "PATENT_ID", referencedColumnName = "ID") @OrderBy("recordDate ASC") @Fields({ @Field(name = "trace.number", store = Store.YES, analyze = Analyze.NO, bridge = @FieldBridge(impl = PatentTraceNumberBridge.class)), @Field(name = "trace.fillingDate", store = Store.YES, analyze = Analyze.NO, bridge = @FieldBridge(impl = PatentTraceFillingDateBridge.class)), @Field(name = "trace.lastRecordDate", store = Store.YES, analyze = Analyze.NO, bridge = @FieldBridge(impl = PatentTraceLastRecordDateBridge.class)), }) @Fetch(FetchMode.SUBSELECT) @IndexedEmbedded private List<PatentTrace> trace; public List<PatentInitiator> getApplicants() { return applicants; } public void setApplicants(List<PatentInitiator> applicants) { this.applicants = applicants; } public List<PatentInitiator> getAuthors() { return authors; } public void setAuthors(List<PatentInitiator> authors) { this.authors = authors; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getEpoId() { return epoId; } public void setEpoId(Long epoId) { this.epoId = epoId; } public Set<PatentTitle> getTitle() { return title; } public void setTitle(Set<PatentTitle> title) { this.title = title; } public Set<PatentDescription> getDescription() { return description; } public void setDescription(Set<PatentDescription> description) { this.description = description; } public Set<Classification> getIpc() { return ipc; } public void setIpc(Set<Classification> ipc) { this.ipc = ipc; } public List<PatentTrace> getTrace() { return trace; } public void setTrace(List<PatentTrace> trace) { this.trace = trace; } public Long getFamilyId() { return familyId; } public void setFamilyId(Long familyId) { this.familyId = familyId; } public void initialize() { if (title == null) { title = new HashSet<>(); } if (description == null) { description = new HashSet<>(); } if (ipc == null) { ipc = new HashSet<>(); } if (applicants == null) { applicants = new LinkedList<>(); } if (authors == null) { authors = new LinkedList<>(); } } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } Patent rhs = (Patent) obj; return new EqualsBuilder() .append(this.title, rhs.title) .append(this.applicants, rhs.applicants) .append(this.authors, rhs.authors) .append(this.ipc, rhs.ipc) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder() .append(title) .append(applicants) .append(authors) .append(ipc) .toHashCode(); } @Override public String toString() { return new ToStringBuilder(this) .append("id", id) .append("title", title) .append("applicants", applicants) .append("authors", authors) .append("ipc", ipc) .append("familyId", familyId) .append("trace", trace) .toString(); } {code} {code:java} @Entity @DynamicInsert @DynamicUpdate @Table(name = "CLASSIFICATION", uniqueConstraints = @UniqueConstraint(columnNames = {"CLASS_CODE"})) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) public class Classification implements Serializable { private static final long serialVersionUID = -3092795599286682284L; @Id @Column(name = "CLASS_CODE", length = 15) @Field(name = "class", store = Store.YES, analyze = Analyze.NO) @Facet(forField = "class") private String code; @Column(name = "DESCRIPTION", length = 1000) private String description; @Column(name = "LEVEL") private Integer level; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "PARENT") @IndexedEmbedded(depth = 1) private Classification parent; @OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, fetch = FetchType.LAZY) private Set<Classification> children; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Integer getLevel() { return level; } public void setLevel(Integer level) { this.level = level; } public Classification getParent() { return parent; } public void setParent(Classification parent) { this.parent = parent; } public Set<Classification> getChildren() { return children; } public void setChildren(Set<Classification> children) { this.children = children; } @Override public int hashCode() { return new HashCodeBuilder() .append(this.code) .toHashCode(); } @Override public boolean equals(Object other) { if (other == null) { return false; } if (other == this) { return true; } if (other.getClass() != this.getClass()) { return false; } Classification that = (Classification) other; return new EqualsBuilder() .append(this.code, that.code) .isEquals(); } @Override public String toString() { return "Classification{" + "code='" + code + '\'' + ", description='" + description + '\'' + ", level=" + level + '}'; } } {code}

    Hibernate JIRA | 1 year ago | Michael Shekhtman
    java.lang.IllegalArgumentException: dimension "ipc.parent.class" is not multiValued, but it appears more than once in this document
  3. 0

    I have a Phrase entity with multiple Tags. {code:title=Phrase.java|borderStyle=solid} @ManyToMany(fetch = FetchType.LAZY) @JoinTable(name = "phrase_tag", joinColumns = @JoinColumn(name = "phrase_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "tag_id", referencedColumnName = "id")) @IndexedEmbedded(includeEmbeddedObjectId = false) public Set<Tag> getTags() { return tags; } {code} The only indexed field in Tag is iid: {code:title=Tag.java|borderStyle=solid} @Transient @Facet(forField = "iid") @Field(name = "iid", index = Index.YES, analyze = Analyze.NO) public Long getIndexingId(){ return getId(); } {code} Adding a {{@Facet}} annotation to mapping results in the following exception while indexing: {code} org.hibernate.search.exception.impl.LogErrorHandler - HSEARCH000058: HSEARCH000183: Unable to index instance of type com.phrask.model.phrase.Phrase while batch indexing: id=33, hashCode=33 java.lang.IllegalArgumentException: DocValuesField "tags.iid" appears more than once in this document (only one value is allowed per field) at org.apache.lucene.index.NumericDocValuesWriter.addValue(NumericDocValuesWriter.java:54) at org.apache.lucene.index.DefaultIndexingChain.indexDocValue(DefaultIndexingChain.java:438) at org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:392) at org.apache.lucene.index.DefaultIndexingChain.processDocument(DefaultIndexingChain.java:318) at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:241) at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:465) at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1526) at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1252) at org.hibernate.search.backend.impl.lucene.works.AddWorkExecutor.performWork(AddWorkExecutor.java:54) at org.hibernate.search.backend.impl.lucene.LuceneBackendTaskStreamer.doWork(LuceneBackendTaskStreamer.java:53) at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueProcessor.applyStreamWork(LuceneBackendQueueProcessor.java:76) at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.performStreamOperation(DirectoryBasedIndexManager.java:107) at org.hibernate.search.backend.impl.StreamingOperationExecutorSelector$AddSelectionExecutor.performStreamOperation(StreamingOperationExecutorSelector.java:106) at org.hibernate.search.backend.impl.batch.DefaultBatchBackend.sendWorkToShards(DefaultBatchBackend.java:62) at org.hibernate.search.backend.impl.batch.DefaultBatchBackend.enqueueAsyncWork(DefaultBatchBackend.java:48) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.index(IdentifierConsumerDocumentProducer.java:263) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.indexAllQueue(IdentifierConsumerDocumentProducer.java:192) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadList(IdentifierConsumerDocumentProducer.java:169) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadAllFromQueue(IdentifierConsumerDocumentProducer.java:135) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.run(IdentifierConsumerDocumentProducer.java:108) at org.hibernate.search.batchindexing.impl.OptionallyWrapInJTATransaction.runWithErrorHandler(OptionallyWrapInJTATransaction.java:104) at org.hibernate.search.batchindexing.impl.ErrorHandledRunnable.run(ErrorHandledRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code} Removing {{@Facet}} annotation removes the exception along with ability for faceting on tag Ids. I didn't find any evidence that faceting over multi value fields is deprecated in {{5.3.0.Final}} so it makes me think that it's a bug.

    Hibernate JIRA | 1 year ago | Ashot Golovenko
    java.lang.IllegalArgumentException: DocValuesField "tags.iid" appears more than once in this document (only one value is allowed per field)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I have a Phrase entity with multiple Tags. {code:title=Phrase.java|borderStyle=solid} @ManyToMany(fetch = FetchType.LAZY) @JoinTable(name = "phrase_tag", joinColumns = @JoinColumn(name = "phrase_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "tag_id", referencedColumnName = "id")) @IndexedEmbedded(includeEmbeddedObjectId = false) public Set<Tag> getTags() { return tags; } {code} The only indexed field in Tag is iid: {code:title=Tag.java|borderStyle=solid} @Transient @Facet(forField = "iid") @Field(name = "iid", index = Index.YES, analyze = Analyze.NO) public Long getIndexingId(){ return getId(); } {code} Adding a {{@Facet}} annotation to mapping results in the following exception while indexing: {code} org.hibernate.search.exception.impl.LogErrorHandler - HSEARCH000058: HSEARCH000183: Unable to index instance of type com.phrask.model.phrase.Phrase while batch indexing: id=33, hashCode=33 java.lang.IllegalArgumentException: DocValuesField "tags.iid" appears more than once in this document (only one value is allowed per field) at org.apache.lucene.index.NumericDocValuesWriter.addValue(NumericDocValuesWriter.java:54) at org.apache.lucene.index.DefaultIndexingChain.indexDocValue(DefaultIndexingChain.java:438) at org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:392) at org.apache.lucene.index.DefaultIndexingChain.processDocument(DefaultIndexingChain.java:318) at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:241) at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:465) at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1526) at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1252) at org.hibernate.search.backend.impl.lucene.works.AddWorkExecutor.performWork(AddWorkExecutor.java:54) at org.hibernate.search.backend.impl.lucene.LuceneBackendTaskStreamer.doWork(LuceneBackendTaskStreamer.java:53) at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueProcessor.applyStreamWork(LuceneBackendQueueProcessor.java:76) at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.performStreamOperation(DirectoryBasedIndexManager.java:107) at org.hibernate.search.backend.impl.StreamingOperationExecutorSelector$AddSelectionExecutor.performStreamOperation(StreamingOperationExecutorSelector.java:106) at org.hibernate.search.backend.impl.batch.DefaultBatchBackend.sendWorkToShards(DefaultBatchBackend.java:62) at org.hibernate.search.backend.impl.batch.DefaultBatchBackend.enqueueAsyncWork(DefaultBatchBackend.java:48) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.index(IdentifierConsumerDocumentProducer.java:263) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.indexAllQueue(IdentifierConsumerDocumentProducer.java:192) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadList(IdentifierConsumerDocumentProducer.java:169) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadAllFromQueue(IdentifierConsumerDocumentProducer.java:135) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.run(IdentifierConsumerDocumentProducer.java:108) at org.hibernate.search.batchindexing.impl.OptionallyWrapInJTATransaction.runWithErrorHandler(OptionallyWrapInJTATransaction.java:104) at org.hibernate.search.batchindexing.impl.ErrorHandledRunnable.run(ErrorHandledRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code} Removing {{@Facet}} annotation removes the exception along with ability for faceting on tag Ids. I didn't find any evidence that faceting over multi value fields is deprecated in {{5.3.0.Final}} so it makes me think that it's a bug.

    Hibernate JIRA | 1 year ago | Ashot Golovenko
    java.lang.IllegalArgumentException: DocValuesField "tags.iid" appears more than once in this document (only one value is allowed per field)
  6. 0

    fasta2adam fails on hg37d5 reference genome

    GitHub | 1 year ago | llevar
    java.lang.IllegalArgumentException: You cannot call toBytes() more than once without calling reset()

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      dimension "ipc.parent.class" is not multiValued, but it appears more than once in this document

      at org.apache.lucene.facet.FacetsConfig.checkSeen()
    2. Lucene Facets
      FacetsConfig.build
      1. org.apache.lucene.facet.FacetsConfig.checkSeen(FacetsConfig.java:175)[lucene-facet-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:39:07]
      2. org.apache.lucene.facet.FacetsConfig.build(FacetsConfig.java:232)[lucene-facet-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:39:07]
      3. org.apache.lucene.facet.FacetsConfig.build(FacetsConfig.java:190)[lucene-facet-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:39:07]
      3 frames
    3. Hibernate Search Engine
      IdentifierConsumerDocumentProducer.run
      1. org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.getDocument(DocumentBuilderIndexedEntity.java:362)[hibernate-search-engine-5.4.0.Final.jar:5.4.0.Final]
      2. org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.createAddWork(DocumentBuilderIndexedEntity.java:250)[hibernate-search-engine-5.4.0.Final.jar:5.4.0.Final]
      3. org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.index(IdentifierConsumerDocumentProducer.java:283)[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final]
      4. org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.indexAllQueue(IdentifierConsumerDocumentProducer.java:223)[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final]
      5. org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadList(IdentifierConsumerDocumentProducer.java:177)[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final]
      6. org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadAllFromQueue(IdentifierConsumerDocumentProducer.java:140)[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final]
      7. org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.run(IdentifierConsumerDocumentProducer.java:117)[hibernate-search-orm-5.4.0.Final.jar:5.4.0.Final]
      7 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[na:1.8.0_60]
      2. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_60]
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_60]
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_60]
      5. java.lang.Thread.run(Thread.java:745)[na:1.8.0_60]
      5 frames