Ejemplo n.º 1
0
 //JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
 //ORIGINAL LINE: public SortingBits(final org.apache.lucene.util.Bits in, Sorter.DocMap docMap)
 public SortingBits(Bits @in, Sorter.DocMap docMap)
 {
     this.@in = @in;
       this.docMap = docMap;
 }
Ejemplo n.º 2
0
 public BitsAnonymousInnerClassHelper(SortingTermsEnum outerInstance, Bits liveDocs)
 {
     this.outerInstance = outerInstance;
     this.liveDocs = liveDocs;
 }
Ejemplo n.º 3
0
            //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
            //ORIGINAL LINE: @Override public org.apache.lucene.index.DocsAndPositionsEnum docsAndPositions(org.apache.lucene.util.Bits liveDocs, org.apache.lucene.index.DocsAndPositionsEnum reuse, final int flags) throws java.io.IOException
            //JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
            public override DocsAndPositionsEnum docsAndPositions(Bits liveDocs, DocsAndPositionsEnum reuse, int flags)
            {
                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final org.apache.lucene.index.DocsAndPositionsEnum inReuse;
                  DocsAndPositionsEnum inReuse;
                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final SortingDocsAndPositionsEnum wrapReuse;
                  SortingDocsAndPositionsEnum wrapReuse;
                  if (reuse != null && reuse is SortingDocsAndPositionsEnum)
                  {
                // if we're asked to reuse the given DocsEnum and it is Sorting, return
                // the wrapped one, since some Codecs expect it.
                wrapReuse = (SortingDocsAndPositionsEnum) reuse;
                inReuse = wrapReuse.Wrapped;
                  }
                  else
                  {
                wrapReuse = null;
                inReuse = reuse;
                  }

                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final org.apache.lucene.index.DocsAndPositionsEnum inDocsAndPositions = in.docsAndPositions(newToOld(liveDocs), inReuse, flags);
                  DocsAndPositionsEnum inDocsAndPositions = @in.docsAndPositions(newToOld(liveDocs), inReuse, flags);
                  if (inDocsAndPositions == null)
                  {
                return null;
                  }

                  // we ignore the fact that offsets may be stored but not asked for,
                  // since this code is expected to be used during addIndexes which will
                  // ask for everything. if that assumption changes in the future, we can
                  // factor in whether 'flags' says offsets are not required.
                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final boolean storeOffsets = indexOptions.compareTo(org.apache.lucene.index.FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
                  bool storeOffsets = indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
                  return new SortingDocsAndPositionsEnum(docMap.size(), wrapReuse, inDocsAndPositions, docMap, storeOffsets);
            }
Ejemplo n.º 4
0
 //JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
 //ORIGINAL LINE: org.apache.lucene.util.Bits newToOld(final org.apache.lucene.util.Bits liveDocs)
 internal virtual Bits newToOld(Bits liveDocs)
 {
     if (liveDocs == null)
       {
     return null;
       }
       return new BitsAnonymousInnerClassHelper(this, liveDocs);
 }
Ejemplo n.º 5
0
            //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
            //ORIGINAL LINE: @Override public org.apache.lucene.index.DocsEnum docs(org.apache.lucene.util.Bits liveDocs, org.apache.lucene.index.DocsEnum reuse, final int flags) throws java.io.IOException
            //JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
            public override DocsEnum docs(Bits liveDocs, DocsEnum reuse, int flags)
            {
                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final org.apache.lucene.index.DocsEnum inReuse;
                  DocsEnum inReuse;
                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final SortingDocsEnum wrapReuse;
                  SortingDocsEnum wrapReuse;
                  if (reuse != null && reuse is SortingDocsEnum)
                  {
                // if we're asked to reuse the given DocsEnum and it is Sorting, return
                // the wrapped one, since some Codecs expect it.
                wrapReuse = (SortingDocsEnum) reuse;
                inReuse = wrapReuse.Wrapped;
                  }
                  else
                  {
                wrapReuse = null;
                inReuse = reuse;
                  }

                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final org.apache.lucene.index.DocsEnum inDocs = in.docs(newToOld(liveDocs), inReuse, flags);
                  DocsEnum inDocs = @in.docs(newToOld(liveDocs), inReuse, flags);
                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final boolean withFreqs = indexOptions.compareTo(org.apache.lucene.index.FieldInfo.IndexOptions.DOCS_AND_FREQS) >=0 && (flags & org.apache.lucene.index.DocsEnum.FLAG_FREQS) != 0;
                  bool withFreqs = indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS) >= 0 && (flags & DocsEnum.FLAG_FREQS) != 0;
                  return new SortingDocsEnum(docMap.size(), wrapReuse, inDocs, withFreqs, docMap);
            }