lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan Humphreys <>
Subject Re: Solr: Elevate with complex query specifying field names
Date Sun, 31 May 2015 23:46:16 GMT
Hi Thomas,

The query elevation component matches queries exactly with entries in
elevate.xml. You can nominate a query field type that is used to process
the query before matching, but that won't help you when your queries have
explicit boosts.

Are you using the eDismax query parser? If so, you can separate your boosts
from the actual query, using the  "qf" edismax configuration parameter,
which specifies which fields to query, and their boosts:

qf=ean name^10.00 persartnr^5.00 persartnr_direct short_description

That way your query isn't polluted with boosts (or fields for that matter),
and an entry in elevate.xml with <query text="test"> will match.



On 31 May 2015 at 23:10, Thomas Michael Engelke <>

> I have Solr as the backend to an ECommerce solution where the fields can
> be configured to be searchable, which generates a schema.xml and loads
> it into Solr.
> Now we also allow to configure Solr search weight per field to affect
> queries, so my queries usually look something like this:
> spellcheck=true&fl=entity_id,score&hl.snippets=1&start=0&q=ean:test+name:test^10.00+persartnr:test^5.00+persartnr_direct:test+short_description:test&spellcheck.q=test&<span+class%3D"highlight">&</span>&
> =map&hl.fl=name,short_description&wt=json&spellcheck.collate=true&hl=true&rows=1000
> Now, I want to add query elevation to my mix. I got it to work pretty
> flawlessly, however, I'm not sure how to get it to work with my queries
> as they specifically state field names and especially boosts on a
> regular basis.
> This works and gets elevated when queried as q=test:
> <elevate>
>  <query text="test">
>  <doc id="14153" />
>  </query>
> </elevate>
> However, when queried as q=name:test^10.00, this elevation does not
> work/doesn't elevate.
> Is there a way around that? Can I specify the naked query somehow for
> the elevation component?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message