private List < MtasTokenString > getPrefixFilteredObjects ( List < MtasTreeHit < ? > > hits , List < String > prefixes ) throws IOException { ArrayList < MtasTokenString > tokens = new ArrayList <> ( ) ; IndexInput inObject = indexInputList . get ( "object" ) ; IndexInput inTerm = indexInputList . get ( "term" ) ; for ( MtasTreeHit < ? > hit : hits ) { MtasTokenString token = MtasCodecPostingsFormat . getToken ( inObject , inTerm , hit . ref ) ; if ( token != null ) { if ( prefixes != null && ! prefixes . isEmpty ( ) ) { if ( prefixes . contains ( token . getPrefix ( ) ) ) { tokens . add ( token ) ; } } else { tokens . add ( token ) ; } } } return tokens ; }
Gets the prefix filtered objects .