All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.datomic.lucene.index.CheckIndex.class Maven / Gradle / Ivy

The newest version!
????1?#com/datomic/lucene/index/CheckIndexjava/lang/ObjectCheckIndex.java5com/datomic/lucene/index/CheckIndex$MySegmentTermDocsMySegmentTermDocs*com/datomic/lucene/index/CheckIndex$Status	Status'(Lcom/datomic/lucene/store/Directory;)V()V')
*"#	, !	.this%Lcom/datomic/lucene/index/CheckIndex;
setInfoStream(Ljava/io/PrintStream;)Voutmsg(Ljava/lang/String;)Vjava/io/PrintStream7println96
8:Ljava/lang/String;
checkIndex.()Lcom/datomic/lucene/index/CheckIndex$Status;java/io/IOException?>(Ljava/util/List;)Lcom/datomic/lucene/index/CheckIndex$Status;=A
Bjava/lang/ThrowableDjava/text/NumberFormatFgetInstance()Ljava/text/NumberFormat;HI
GJ%com/datomic/lucene/index/SegmentInfosL
M*

*	
,readQ(
MR4ERROR: could not read any segments file in directoryT56
VmissingSegmentsX%	
YprintStackTrace[3
E\???java/lang/Integer_toString(I)Ljava/lang/String;ab
`c?$com/datomic/lucene/util/StringHelperfgetVersionComparator()Ljava/util/Comparator;hi
gjiterator()Ljava/util/Iterator;lm
Mnjava/util/IteratorphasNext()Zrsqtnext()Ljava/lang/Object;vwqx$com/datomic/lucene/index/SegmentInfoz
getVersion()Ljava/lang/String;|}
{~pre-3.1?2.x?java/lang/String?equals(Ljava/lang/Object;)Z??
??java/util/Comparator?compare'(Ljava/lang/Object;Ljava/lang/Object;)I????size()I??
M?getCurrentSegmentFileName?}
M?"com/datomic/lucene/store/Directory?	openInput9(Ljava/lang/String;)Lcom/datomic/lucene/store/IndexInput;??
??0ERROR: could not open segments file in directory?cantOpenSegments?%	
?#com/datomic/lucene/store/IndexInput?readInt??
??7ERROR: could not read segment file version in directory?missingSegmentVersion?%	
?close?)
???FORMAT [Lucene Pre-2.1]?FORMAT_LOCKLESS [Lucene 2.1]?$FORMAT_SINGLE_NORM_FILE [Lucene 2.2]?$FORMAT_SHARED_DOC_STORE [Lucene 2.3]?FORMAT_CHECKSUM [Lucene 2.4]?FORMAT_DEL_COUNT [Lucene 2.4]?FORMAT_HAS_PROX [Lucene 2.4]?FORMAT_USER_DATA [Lucene 2.9]?FORMAT_DIAGNOSTICS [Lucene 2.9]?FORMAT_HAS_VECTORS [Lucene 3.1]?FORMAT_3_1 [Lucene 3.1+]?java/lang/RuntimeException?!BUG: You should update this tool!?'6
??java/lang/StringBuilder?
?*int=?append-(Ljava/lang/String;)Ljava/lang/StringBuilder;??
??(I)Ljava/lang/StringBuilder;??
??) [newer version of Lucene than this tool]?a}
?? [Lucene 1.3 or prior]?segmentsFileName?<	
?numSegmentsI??	
?
segmentFormat?<	
?getUserData()Ljava/util/Map;??
M?userDataLjava/util/Map;??	
?
java/util/Map???
 userData=?-(Ljava/lang/Object;)Ljava/lang/StringBuilder;??
??
versions=[? .. ?]?version=?Segments file=
 numSegments=  format=partial	%	


Checking only these segments:print6
8java/util/ListnsegmentsCheckedLjava/util/List;	
addAll(Ljava/util/Collection;)Z:?
ERROR: this index appears to be created by a newer version of Lucene than this tool was compiled on; please re-compile this tool on the matching version of Lucene; exiting
toolOutOfDate %	
!clone#w
M$newSegments'Lcom/datomic/lucene/index/SegmentInfos;&'	
(clear*)
M+maxSegmentName-?	
.info)(I)Lcom/datomic/lucene/index/SegmentInfo;01
M2name4<	{5	substring7b
?8parseInt(Ljava/lang/String;I)I:;
`<contains>??

*segmentInfosB	
CaddE?F  H of J: name=L
 docCount=NdocCountP?	{Q	
5	
Q
    compound=UgetUseCompoundFileWs
{X(Z)Ljava/lang/StringBuilder;?Z
?[compound]%	
^    hasProx=`
getHasProxbs
{chasProxe%	
f
    numFiles=hfiles()Ljava/util/List;jk
{l?numFileso?	
psizeInBytes(Z)Jrs
{tA0sizeMBDxy	
z    size (MB)=|format(D)Ljava/lang/String;~
G?getDiagnostics??
{?diagnostics??	
?    diagnostics = ?getDocStoreOffset??
{?    docStoreOffset=?docStoreOffset??	
?    docStoreSegment=?getDocStoreSegment?}
{?docStoreSegment?<	
?    docStoreIsCompoundFile=?getDocStoreIsCompoundFile?s
{?docStoreCompoundFile?%	
?getDelFileName?}
{?    no deletions?hasDeletions?%	
?    has deletions [delFileName=?deletionsFileName?<	
?    test: open reader.........?DEFAULT_TERMS_INDEX_DIVISOR??	?&com/datomic/lucene/index/SegmentReader?getR(ZLcom/datomic/lucene/index/SegmentInfo;I)Lcom/datomic/lucene/index/SegmentReader;??
??openReaderPassed?%	
?numDocs??
???s
??deletedDocs#Lcom/datomic/lucene/util/BitVector;??	??!com/datomic/lucene/util/BitVector?count??
??getDelCount??
{?delete count mismatch: info=? vs deletedDocs.count()=?maxDoc??
?? too many deleted docs: maxDoc()=? vs reader=?
numDeleted??	
?OK [? deleted docs]?OK?SegmentReader.maxDoc() ? != SegmentInfos.docCount ?    test: fields..............?ALL2Lcom/datomic/lucene/index/IndexReader$FieldOption;??	?
getFieldNamesJ(Lcom/datomic/lucene/index/IndexReader$FieldOption;)Ljava/util/Collection;??
??java/util/Collection??? fields]?	numFields??	
?testFieldNorms|(Ljava/util/Collection;Lcom/datomic/lucene/index/SegmentReader;)Lcom/datomic/lucene/index/CheckIndex$Status$FieldNormStatus;??
?fieldNormStatusLcom/datomic/lucene/index/CheckIndex$Status$StoredFieldStatus;
	
testTermVectors?(Lcom/datomic/lucene/index/SegmentInfo;Lcom/datomic/lucene/index/SegmentReader;Ljava/text/NumberFormat;)Lcom/datomic/lucene/index/CheckIndex$Status$TermVectorStatus;
termVectorStatus=Lcom/datomic/lucene/index/CheckIndex$Status$TermVectorStatus;	
errorLjava/lang/Throwable;	Field Norm test failed	Term Index test failed	Stored Field test failed"	Term Vector test failed%FAILED'1fixIndex() would remove reference to this segment)
    WARNING: +; full exception:-totLoseDocCount/?	
0numBadSegments2?	
3
??
{$)(Lcom/datomic/lucene/index/SegmentInfo;)VE7
M8clean:%	
;	WARNING: = broken segments (containing ? documents) detectedAcounterC?	MDvalidCounterF%	
G!ERROR: Next segment name counter I& is not greater than max segment name K+No problems were detected with this index.
Mtversionsi&Lcom/datomic/lucene/index/SegmentInfo;i$Ljava/util/Iterator;userDataStrings5Ljava/util/Map;delFileName
fieldNames*Ljava/util/Collection;Ljava/util/Collection;commentsegmentNamesegInfoStat>Lcom/datomic/lucene/index/CheckIndex$Status$SegmentInfoStatus;toLoseDocCountreader(Lcom/datomic/lucene/index/SegmentReader;ionlySegments$Ljava/util/List;nfLjava/text/NumberFormat;sisresult,Lcom/datomic/lucene/index/CheckIndex$Status;oldestnewestoldSegsfoundNonNullVersionversionComparator*Ljava/util/Comparator;Ljava/util/Comparator;input%Lcom/datomic/lucene/store/IndexInput;sFormatskip
versionString
*    test: field norms.........x?nhasNorms(Ljava/lang/String;)Z{|
?}norms(Ljava/lang/String;[BI)V?
??	totFieldsJ??	?(J)Ljava/lang/StringBuilder;??
??ERROR [?
getMessage?}
E?valueOf&(Ljava/lang/Object;)Ljava/lang/String;??
??	fieldNameb[Bestatus
*'com/datomic/lucene/search/IndexSearcher?)(Lcom/datomic/lucene/index/IndexReader;)V'?
??    test: terms, freq, prox...?terms%()Lcom/datomic/lucene/index/TermEnum;??
??
termPositions*()Lcom/datomic/lucene/index/TermPositions;??
??getPostingsSkipInterval??
??+(Lcom/datomic/lucene/index/SegmentReader;)V'?
?!com/datomic/lucene/index/TermEnum?vs
??	termCount??	?term!()Lcom/datomic/lucene/index/Term;??
??docFreq??
??&com/datomic/lucene/index/TermPositions?seek"(Lcom/datomic/lucene/index/Term;)V????totFreq??	???doc????freq????term ?: doc ? <= lastDoc ? >= maxDoc ?: freq ? is out of bounds?totPos??	?nextPosition????: pos ? < lastPos ?skipTo(I)Z????: skipTo(docID=?) returned docID=?	termFreq ?	position ? is <= lastPosition ?), then .next() returned docID=? vs prev docID=?
?
?delCount??	?	 docFreq=? != num docs seen ? + num docs deleted ?#com/datomic/lucene/search/TermQuery'?
searchG(Lcom/datomic/lucene/search/Query;I)Lcom/datomic/lucene/search/TopDocs;
? terms; 	 terms/docs pairs;  tokens]
posjlastPosposUptodocIDlastPosition	nextDocID	skipDocIDidxLcom/datomic/lucene/index/Term;lastDocfreq0termEnum#Lcom/datomic/lucene/index/TermEnum;(Lcom/datomic/lucene/index/TermPositions;postingsSkipInterval
myTermDocs7Lcom/datomic/lucene/index/CheckIndex$MySegmentTermDocs;lastTermis)Lcom/datomic/lucene/search/IndexSearcher;
*    test: stored fields.......%	isDeleted'?
?(	Qdocument)(I)Lcom/datomic/lucene/document/Document;+,
?-	?$com/datomic/lucene/document/Document0	getFields2k
13	docCount=5	 but saw 7 undeleted docs9 total field count; avg ; fields per doc]=&Lcom/datomic/lucene/document/Document;
*    test: term vectors........A	QgetTermFreqVectors-(I)[Lcom/datomic/lucene/index/TermFreqVector;DE
?F
totVectorsH?	I total vector count; avg K! term/freq vector fields per doc]Mtfv*[Lcom/datomic/lucene/index/TermFreqVector;fixIndex/(Lcom/datomic/lucene/index/CheckIndex$Status;)V"java/lang/IllegalArgumentExceptionSWcan only fix an index that was fully checked (this status checked a subset of segments)U
T?changedX)
MYcommit[(
M\testAsserts$%	_&%	a^s
cjava/lang/AssertionErrore
f*main([Ljava/lang/String;)Vjava/lang/InterruptedExceptionjjava/util/ArrayListl
m*-fixo-segmentqjava/lang/Systems4!	tu'ERROR: missing name for -segment optionwexit(I)Vyz
t{"ERROR: unexpected extra argument '}' 
ERROR: index path not specified?f
Usage: java org.apache.lucene.index.CheckIndex pathToIndex [-fix] [-segment X] [-segment Y]

  -fix: actually write a new segments_N file, removing any problematic segments
  -segment X: only check the specified segments.  This can be specified multiple
              times, to check more than one segment, eg '-segment _2 -segment _a'.
              You can't use this with the -fix option

**WARNING**: -fix should only be used on an emergency basis as it will cause
documents (perhaps many) to be permanently removed from the index.  Always make
a backup copy of your index before running this!  Do not run this tool on an index
that is actively being written to.  You have been warned!

Run without -fix, this tool will open the index, report version information
and report any exceptions it hits and what action it would take if -fix were
specified.  With -fix, this tool will remove any segments that have issues and
write a new segments_N file.  This means all documents contained in the affected
segments will be removed.

This tool exits with exit code 1 if the index cannot be opened or has any
corruption, else 0.
?$s
?o
NOTE: testing will be more thorough if you run java with '-ea:org.apache.lucene...', so assertions are enabled?,ERROR: cannot specify both -fix and -segment?
Opening index @ ?
?java/io/File?
??$com/datomic/lucene/store/FSDirectory?open6(Ljava/io/File;)Lcom/datomic/lucene/store/FSDirectory;??
??!ERROR: could not open directory "?
"; exiting?'(
?23
?,WARNING: would write new segments file, and ?1 documents would be lost, if -fix were specified
? documents will be lost
?BNOTE: will write new segments file in 5 seconds; this will remove ?9 docs from the index. THIS IS YOUR LAST CHANCE TO CTRL+C!??java/lang/Thread?sleep(J)V??
??...?
Writing...?QR
?Wrote new segments file "?"?exitCodeargs[Ljava/lang/String;doFix	indexPathcheckerjava/lang/Class?desiredAssertionStatus?s
??CodeLocalVariableTableLineNumberTable
ExceptionsLocalVariableTypeTable	SignatureR(Ljava/util/List;)Lcom/datomic/lucene/index/CheckIndex$Status;?(Ljava/util/Collection;Lcom/datomic/lucene/index/SegmentReader;)Lcom/datomic/lucene/index/CheckIndex$Status$FieldNormStatus;
SourceFileInnerClasses! !"#
$%&%'(?O*?+*+?-*?/??01"#?	23?>*+?/??014!?

56?L*?/?*?/+?;??015<?=>?0*?C??01?2?@=A??
!?KM?MY?NN?
Y?O:*?-?P-*?-?S?$:*U?W?Z*?/?*?/?]?^?d:e?d::6?k:	-?o:

?u?]
?y?{:?:?
?:?;????
?:?*6	???:	???:???-??6
-??::*?-??:?$:
*??W*?/?
*?/?]???6
??6
?6?A:*??W*?/?*?/?]??:??:??:?????:6
??:
??
?:??
??
?:??
??
?:??
??
?:??
??
?:??
??
?:??
??
?:?|
??
?:?n
??
?:?`
??
?:?R
??
??Yʷ̿
??$??Y??Ѷ?
??ڶն?:6???Y??
??޶ն?:??
????-???-??????Y?????-?????:??::?J?+??Y??????????????ն?:?d??Y?????ն?:?J?????Y?????նܧ&??Y??????????????ն?:*??Y????????
???????????նܷW+?q?*?/?
*?/
?+?:?u?5?y??:*?/?*?/??Y?????նܶ????+?W*?W?*?W?"?-?%?M?)?)?,?/6
?j-?3:?6?9$?=6?/?
?/+?+?6?@??&?
Y?A:?D?GW*??Y??I??`??K??
??M???6??O???R?ضܷW?6?S?R?T?R6:*??Y??V???Y?\?ܷW?Y?_*??Y??a???d?\?ܷW?d?g*??Y??i???m?n?ضܷW?m?n?q?u?vo?{*??Y??}??,?{???նܷW??:?????*??Y????????ܷW??6?o*??Y??????ضܷW??*??Y????????նܷW????*??Y????????\?ܷW??????:?*??W???.*??Y?????????նܷW????*?/?
*?/??????:????66?????Ŷ??͟4??Y??Y??϶??Ͷ?Ѷ??Ŷʶضܷ̿?Ŷ??Ԥ4??Y??Y??ֶ??Զ?Ѷ??Ŷʶضܷ̿?Rd?͟4??Y??Y??϶??Ͷ?ض??Rd?ضܷ̿?Rd??*??Y??ݶ??۶?߶նܷW?C?͙4??Y??Y??϶??Ͷ?ض??Rd?ضܷ̿*?W???R?1??Y??Y?????Զ????R?ضܷ̿*?/?
*?/????:*??Y??ݶ???????նܷW????*????*??*,??*,????????Y?̿?????Y ?̿??!???Y#?̿??$???Y&?̿*??W?n?y:*(?W*:*??Y??,????.?նܷW*?/?*?/?]*??WY?1`?1Y?4`?4??):??:??5??)?6?{?9?????4?????4??@???1??B?նܷW?/-?E??Z?H?A?<?)?/`?E*??Y??J??-?E??L???/?ضܷW?LGMJQXR[S^TcUV?W?Y?Z?\?^?_?`?b?c?f?h?i?j?l?s?m?n?o?pqrtvw?wx#y*z3{9|C~RY?]?`?f?j?q?x????????????????????????????????????????)?/?E?L?S?Z?c?o???????????????$?c?g?m?t?~??????????????????????????&?0?7?I?L?U?b?????????????????/?>?N?n?u?|??????????????????$+4RX_
fp{???????&Wd?? ?"?$?%()+,C-O0\3i6w9?=?>???@?A?B?C?D?G?I?W?I?J?L?M	N	O	&P	,Q	8R	CS	IU	XV	_Z	o?	u]	~^	?`	?b	?c	?d	?e
h
i
l?@????????Y?wN*?/?
*?/y?,?Լ:+?z:?u?.?y??:,?~?,??-Y??
a?????*??Y??ݶ?-??????նܷW??:*??Y?????????????նܷW-?*?/?*?/?]-??E?R??<)5ST!^???:??01?Y[?ab?????YZ?Bswxz!{?|H}Q~^?????????????????H??Y??N??Y,??:*?/?
*?/??,??:,??:,??6?Y,??:,??6	:
????-Y??
a????::
??6??6
6-Y???a?????????6??6
?6??Y??Y??Ͷ???϶???Ѷ?
?ضܷ̿	?6??Y??Y??Ͷ???϶???Ӷ?	?ضܷ̿6
??նܷW?@:*??Y?????????????նܷW?!*?/?*?/?]?	??E?RB??@??;?010Rab~g	?
?N	& /!:"B#W](i)?,?4?.?/0
126??ۻY?@:*?/?
*?/B?6+?R?8,?)?)Y?C`?C,?G:?Y?J??a?J????*??Y??ݶ??J??L??-?J??C?n?????N?նܷW?@:*??Y?????????????նܷW?$*?/?*?/?]?	??E?RBOP>??;??01?0R?ab?~g	???J=	@AD&E/F:GBHGIUD[N?V?P?Q?R?S?T?XQR?i%+???TYV?W?+?)?Z+?)+?P?]??%01%ij?ijkl$m?@
^s?"?`??
rs
$s?4?b??d??fY?g??`??
wx	hi? 	z???1????նܶ;?v??Y??????1????նܶ;6?2????v??Y??I??d????նܶ;???βv??;???v?;?v??Y??????)??????նܶ;?v??;?<?	6?6?|?E?z,O?5V?n??z??x?%
pdn?<kc?x"#K/?1[ijt???
pde??>??
????#?%?+?8?A?J?N?[?a?e?????????????????????????????????????4?<?@?K?S?[?c?g?o?s?????????????#?*?3?Z?b?k?qty?@k?)?)?ǚ??b??3??B

	

	








© 2015 - 2025 Weber Informatics LLC | Privacy Policy