On 18/02/2016 09:07, Christian Effertz wrote:
Hi,

Can I somehow feed Solr with a result set or a list of primary keys and get
the shortest query that leads to this result? In other terms, can I reverse
engineer a query for a given result set?

Some background why I ask this question:
We are currently migrating a search application from Oracle Text to Solr.
Our users have several (>30) complex queries that we need to migrate to our
new Solr index. This can be done by hand, but is rather time consuming. To
get an idea of how long the whole task would need, we started with a hand
full of them. We spent ~2-4h per query to get everything right.

Thank you for your input

Hi Christian,

This sounds very much like some of the work we've done migrating media monitoring applications to Solr, although in these cases we're dealing with 10k-1m stored queries. We have done Oracle Text but have dealt with dtLucene & Verity (VQL).

I don't think there's any way to reverse engineer your query in this way I'm afraid. Approaches we've taken include writing Lucene query parsers that can ingest the old query language (for translation on the fly) or parsers that turn the old language into either Lucene syntax or some intermediate engine-neutral language (which can then be simply parsed into Lucene syntax). For your small volume, manual translation may be best.

The key here is how will you know the new queries are returning the same results as the old queries: for this you'll need some kind of test setup with an archive of old data. It's important to remember (and often very hard to convince people!) that by changing underlying engines you *will* get different results, whatever you do, but you'll need to work out exactly what differences you can tolerate.

HTH,

Charlie
--
Charlie Hull
Flax - Open Source Enterprise Search

tel/fax: +44 (0)8700 118334
mobile:  +44 (0)7767 825828
web: www.flax.co.uk

Reply via email to