You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Modassar Ather <mo...@gmail.com> on 2017/02/22 06:44:09 UTC

Query complexity scorer.

Hi,

I am trying to find possible complexity of a query heuristically/ based on
learning and provide a score to it before it is actually sent to Solr for
execution.
The query may contain wildcards, complex phrases, phrases with wildcards.

The approach is to assign a number to each part of a query and then get an
accumulated normalized score. It can also be extended further for scoring
based on pattern of queries.
The scorer is unaware of Solr, index size and possible complexity involved
in finding a match due to which a simple looking query is scored less
complex but takes more time in Solr than a query looking more complex.

Kindly share your suggestions and inputs on the parameters to consider and
how it can be implemented.

Note: I am using SpanQueryParser (
https://issues.apache.org/jira/browse/LUCENE-5205) for phrases/complex
phrases.

Thanks,
Modassar