public PhraseQuery build() {Term[] terms = this.terms.toArray(new Term[this.terms.size()]);int[] positions = new int[this.positions.size()];for (int i = 0; i < positions.length; ++i) {positions[i] = this.positions.get(i);}return new PhraseQuery(slop, terms, positions);}
public virtual StemmerOverrideMap Build(){ByteSequenceOutputs outputs = ByteSequenceOutputs.Singleton;Builder<BytesRef> builder = new Builder<BytesRef>(FST.INPUT_TYPE.BYTE4, outputs);int[] sort = hash.Sort(BytesRef.UTF8SortedAsUnicodeComparer);Int32sRef intsSpare = new Int32sRef();int size = hash.Count;for (int i = 0; i < size; i++){int id = sort[i];BytesRef bytesRef = hash.Get(id, spare);UnicodeUtil.UTF8toUTF32(bytesRef, intsSpare);builder.Add(intsSpare, new BytesRef(outputValues[id]));}return new StemmerOverrideMap(builder.Finish(), ignoreCase);}