: in my custom request handler, I want to determine which fields are : constrained by the user. : : E.g. the query (q) might be "ipod AND brand:apple" and there might : be a filter query (fq) like "color:white" (or more). : : What I want to know is that "brand" and "color" are constrained.
technically the "ipod" keyword is field constrained as well, using the defaultSerachField. : AFAICS I could use SolrPluginUtils.parseFilterQueries and test : if the queries are TermQueries and read its Field. : Then should I also test which kind of queries I get when parsing : the query (q) and look for all TermQueries from the parsed query? are you specificly only interested in TermQueries? wouldn't a range query also be a user constraint? : Or is there a more elegant way of doing this? it's hard to be sure without a better understanding of exactly what your custom handler needs to do, but my best guess is a custom QueryParser that records all the FieldNames it sees when parsing. -Hoss