public static void main(String[] args) {
        FieldMatchMetricsComputer c=new FieldMatchMetricsComputer();
        String query=getQuery(args);
        String field=getField(args);
        if (query==null || field==null) {
            printUsage();
            return;
        }

        FieldMatchMetrics metrics = c.compute(query,field);
        System.out.println(metrics.toStringDump());
    }
Helper for computing metrics from the command line.
searchlib/src/main/java/com/yahoo/searchlib/ranking/features/fieldmatch/Main.java