public static void Main(System.String[] args) { QueryParser qp = new QueryParser("Field", new Monodoc.Lucene.Net.Analysis.SimpleAnalyzer()); Query q = qp.Parse(args[0]); System.Console.Out.WriteLine(q.ToString("Field")); }
/// <summary>Parses a query string, returning a {@link Monodoc.Lucene.Net.Search.Query}.</summary> /// <param name="query"> the query string to be parsed. /// </param> /// <param name="field"> the default Field for query terms. /// </param> /// <param name="analyzer"> used to find terms in the query text. /// </param> /// <throws> ParseException if the parsing fails </throws> static public Query Parse(System.String query, System.String field, Analyzer analyzer) { QueryParser parser = new QueryParser(field, analyzer); return parser.Parse(Escape(query)); }