public MultiPhraseQuery build() {int[] positionsArray = new int[this.positions.size()];for (int i = 0; i < this.positions.size(); ++i) {positionsArray[i] = this.positions.get(i);}Term[][] termArraysArray = termArrays.toArray(new Term[termArrays.size()][]);return new MultiPhraseQuery(field, termArraysArray, positionsArray, slop);}

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);}
