I have a requirement to make SOLR a turnkey replacement for our legacy search engine. To do this, the queries supported by the legacy search engine has to be supported by SOLR.
To do this, I have implemented a QueryParser. I've implemented it several ways: 1. I've copied the implementation in LuceneQParser, that uses the SolrQueryParser, and essentially replaces the params of my QParser replacing it with the an instance of the ModifiableSolrParams object. Taking care to copy what exists in the previous params object and replacing the 'fq' argument that is mapped from the query argument supported by the legacy search engine. The problem with this approach is that ModifiableSolrParams does not allow you to have multiple fq arguments in it. But in some cases, we need to support multiple field restrictions. I would have preferred this solution because I imagine that leveraging SOLR's robust query parsing mechanism is more easier than building a Lucene Query from scratch. 2. The second approach, uses a BooleanQuery and attempts to construct the entire query from the query parameters. This approach seemed more promising, and works for most field restrictions. But I hit a road block. The filter seems to work for all string fields. But when I declare a field as an integer field in my schema.xml config file, the search does not return the very same documents. I am not sure why? I was wondering what the best approach to this problem is (either 1 or 2 above, or something even better). And I was wondering how to fix the problem in each of the above cases. -- View this message in context: http://lucene.472066.n3.nabble.com/QueryParser-to-translate-query-arguments-tp4212394.html Sent from the Solr - User mailing list archive at Nabble.com.