Extend ES5 query parser to expand one field into many

We are in the process of upgrading from ES1 to ES5. One of the plugins we had implemented was a custom query parser which was a copy of QueryStringQueryParser with the added ability to expand field queries into many or'ed queries. So it might take a query like name:joe and expand it into (first_name:joe OR last_name:joe OR title:joe)

I have created a class and extended Plugin and implemented getQueries and my builder gets called which is great but it doesn't look like I can override the method that parses the fields org.apache.lucene.queryparser.classic.MapperQueryParser#createFieldQuery since the mapper is a final variable part of the context.

Anyone have any idea how I might be able to pull this off.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.