I am having some trouble getting a self referencing table to generate the necessary index files for doing searches against my table. My model object is listed below with the annotations sprinkled in for hibernate searches.
I have trace logging turned on and they don't seem to show anything erroring out, but it only creates :
I have other indexes set up on less complicated tables working just fine, and from the logs I can see that it actually selected all of the records in the table to index "org.hibernate.search.batchindexing.impl.SimpleIndexingProgressMonitor] (ServerService Thread Pool -- 15) HSEARCH000028: Reindexed 7021 entities"
Code:
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "node_type", discriminatorType = DiscriminatorType.STRING)
@Table(name = "gc_node")
@AttributeOverride(name="nodeType", column = @Column(name="node_type", insertable = false, updatable = false))
@DiscriminatorOptions(force = true)
@Indexed
public class GcNode {
@Id
@SequenceGenerator(name = "NODE_SEQUENCE_GENERATOR", sequenceName = "NODE_ID_SEQ", allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "NODE_SEQUENCE_GENERATOR")
@Column(name = "node_id", nullable = false, insertable = true, updatable = true)
@DocumentId
protected Integer nodeId;
@ManyToOne(cascade={CascadeType.ALL})
@JoinColumn(name="parent_id")
private GcNode gcParentNode;
@Enumerated(EnumType.STRING)
@Column(name = "node_type", nullable = false, insertable = true, updatable = true, length = 64)
protected NodeType nodeType;
@Column(name = "node_name", nullable = true, insertable = true, updatable = true, length = 512)
@Field(index = Index.YES, analyze = Analyze.YES, analyzer = @Analyzer(definition = "lowerCaseWhiteSpaceAnalyzer") , store = Store.YES)
protected String nodeName;
@Column(name = "description", nullable = true, insertable = true, updatable = true, length = 512)
protected String description;
@ManyToMany(mappedBy="gcNodes")
private Set<PlatformUser> platformUsers = new HashSet<PlatformUser>(0);
@Column(name = "is_deleted", updatable = true)
protected boolean isDeleted;
here is a bigger section of my trace log for this specific table.
Code:
dir=MMapDirectory@/private/tmp/lucene/umod/indexes/com.persistence.model.GcNode lockFactory=NativeFSLockFactory@/tmp/lucene/umod/indexes/com.persistence.model.GcNode
index=
version=4.10.4
matchVersion=4.10.4
analyzer=org.apache.lucene.analysis.core.SimpleAnalyzer
ramBufferSizeMB=16.0
maxBufferedDocs=-1
maxBufferedDeleteTerms=-1
mergedSegmentWarmer=null
readerTermsIndexDivisor=1
termIndexInterval=32
delPolicy=org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy
commit=null
openMode=APPEND
similarity=org.apache.lucene.search.similarities.DefaultSimilarity
mergeScheduler=ConcurrentMergeScheduler: maxThreadCount=1, maxMergeCount=2, mergeThreadPriority=-1
default WRITE_LOCK_TIMEOUT=1000
writeLockTimeout=1000
codec=Lucene410
infoStream=org.hibernate.search.util.logging.impl.LoggerInfoStream
mergePolicy=[LogByteSizeMergePolicy: minMergeSize=1677721, mergeFactor=10, maxMergeSize=2147483648, maxMergeSizeForForcedMerge=9223372036854775807, calibrateSizeByDeletes=true, maxMergeDocs=2147483647, maxCFSSegmentSizeMB=8.796093022207999E12, noCFSRatio=0.1]
indexerThreadPool=org.apache.lucene.index.DocumentsWriterPerThreadPool@5a4993be
readerPooling=false
perThreadHardLimitMB=1945
useCompoundFile=true
checkIntegrityAtMerge=false
writer=org.apache.lucene.util.SetOnce@1d26c013
then it kind of ends of with a semi positive note of "success=true" :) even though the index files never were created.
Code:
Hibernate Search sync consumer thread for index com.gutcheck.persistence.model.GcNode finishFullFlush success=true