private CompositeItem chooseCompositeForCJK(BlockItem current, CompositeItem parent, String indexName) { CompositeItem composite; if (current.getSegmentingRule() == SegmentingRule.LANGUAGE_DEFAULT) { if (parent instanceof PhraseItem || current instanceof PhraseSegmentItem) { composite = phraseSegment(current, indexName); } else composite = createAndSegment(current); } else { switch (current.getSegmentingRule()) { case PHRASE: composite = phraseSegment(current, indexName); break; case BOOLEAN_AND: composite = createAndSegment(current); break; default: throw new IllegalArgumentException( "Unknown segmenting rule: " + current.getSegmentingRule() + ". This is a bug in Vespa, as the implementation has gotten out of sync." + " Please create a ticket as soon as possible."); } } return composite; }