-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expressing constant score queries #6
Comments
Hi, it’s great to hear you find this library useful. We can definitely add support for this kind of queries.
Any idea what other python operator could be used for that feature? Or maybe you have some other idea for an API that would present the constant score queries in a concise and expressive way?
… Wiadomość napisana przez Benjamin Le Forestier ***@***.***> w dniu 01.04.2018, o godz. 01:14:
Hi,
thanks for this library, it's very useful to me.
But I haven't found a way to express constant score queries using Q.
(see https://lucene.apache.org/solr/guide/7_2/the-standard-query-parser.html or https://stackoverflow.com/a/46151908/1126971 ).
In Solr, they write it like this: field:value^=1 for example.
Using ^= in Solrq is out of the question since you already use it to boost a Q object in place.
But I'd really like a way to express these in Solrq.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
There's not a lot of operators left unfortunately. The only one that could remind of the meaning of this particular type of query is Q(field="value").constant_score(1) & Q(other_field="other value").constant_score(2.25) It doesn't look so bad to me and it's easy to understand what it does. |
@leforestier I like your design idea. Let's do it. I will prepare a separate branch with this feature this week. Will you want to review this as PR. |
Hi,
thanks for this library, it's very useful to me.
But I haven't found a way to express constant score queries using
Q
.(see https://lucene.apache.org/solr/guide/7_2/the-standard-query-parser.html or https://stackoverflow.com/a/46151908/1126971 ).
In Solr, they write it like this:
field:value^=1
for example.Using
^=
in Solrq is out of the question since you already use it to boost aQ
object in place.But I'd really like a way to express these in Solrq.
The text was updated successfully, but these errors were encountered: