0
votes

I have a custom "phrase query parser" develeped by some third-party who is not available. That parser rewrites several query types into SpanQueries (each type in some different way). The problem is that it was written for Lucene v3 and now I'm migrating my search to L. v4, and that parser started getting another type to rewrite (ConstantScoreQuery), which was not expected before and now it's not handled by this parser.

Could someone help me and explain how to convert that ConstantScoreQuery into one of the SpanQuery types??

Best regards, Piotr

1

1 Answers

0
votes

ConstantScoreQuery is a wrapper. It's quite possible it is still producing a SpanQuery (or whatever other query type was expected), which is then wrapped with the ConstantScoreQuery. I'd see if ConstantScoreQuery.getQuery() returns something you can use.