views:

576

answers:

1

If I have a Lucene query string

"field1:value1 myField:aValue"

Is there a way to let Lucene parse this so I can get term queries?
I ultimately want to be able to get the field names and their values back to my viewdata so I can fill them in my textboxes on post back.

+2  A: 

lucene's QueryParser will convert that string into a BooleanQuery containing two TermQuery clauses. You'll need to use the getClauses method of BooleanQuery to get the term queries.

itsadok