自引用表未创建索引文件

时间:2015-10-28 17:00:53

标签: java lucene hibernate-search

我在获取自引用表以生成必要的索引文件以执行对我的表的搜索时遇到一些麻烦。我的模型对象在下面列出,其中注释用于休眠搜索。 我打开了跟踪日志记录,它们似乎没有显示任何错误,但它只创建:

  • segments.gen
  • segments_1
  • write.lock

我在不太复杂的表上设置其他索引工作得很好,从日志中我可以看到它实际选择了表中的所有记录来索引

  

“org.hibernate.search.batchindexing.impl.SimpleIndexingProgressMonitor]   (ServerService线程池 - 15)HSEARCH000028:重新索引7021   实体“

 @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;
...
}

这是此特定表的跟踪日志的更大部分。

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

永远不会创建的索引属于此

  

HSEARCH000226:IFD:init:加载提交“segments_1”
   HSEARCH000226:IFD:现在检查点“”[0段; isCommit = false]
   HSEARCH000226:IFD:0毫秒到检查点
   HSEARCH000226:IW:init:create = false

'org.hibernate.search.backend.impl.lucene.works.AddWorkExecutor'中没有任何痕迹

与其他工作的索引相比,它看起来像这样

  

HSEARCH000226:IFD:init:加载提交“segments_53”
  HSEARCH000226:IFD:现在检查点“_hv(4.10.4):C2699”[1段; isCommit = false]
  HSEARCH000226:IFD:0毫秒到检查点
  HSEARCH000226:IW:init:create = false

0 个答案:

没有答案