tags:

views:

685

answers:

1

Does Lucene QueryParser.parse(string) still work? If it is deprecated, what is the new syntax?

Query query = QueryParser.parse("Ophelia");

Thanks Tatyana

+1  A: 

Not sure of the exact API, but it's changed to an instance object. All QueryParsers are now instance objects.

var qp = new QueryParser(new StandardAnalyzer(),fields);
qp.Parse(inputString,fields);
CVertex
Slightly different in Lucene-2.4.0but worksQueryParser qp = new QueryParser("the default field for query terms", analyzer);Query query = qp.parse("Ophelia");Thanks, Tatyana
Tatyana Solovyeva
Thanks, can u mark my answer as correct please?
CVertex