78799

Negative boost in Azure Search Profiles

Question:

We have been working on creating scoring profiles for our search. We need a way to "bury" or give "negative" boosts to some fields in case of types of scoring function "Magnitude", "Freshness", "Tags". We noticed that we cannot add a negative value for boost. Is there any other way to achieve this kind of behavior (burying results based the field) We cannot use $OrderBy because it takes precedence over the scoring profile.

Please advise. Thanks!

Answer1:

you should only set positive boosting values, as described [here][1]. There may be a few things you could do. The first thing I would try is to set the weight to 0 for the fields that you do not care about. In that case, they will simply not impact the relevance.

Another option: If you know that a field should not impact relevance you could simply make that field not 'searchable'. That said, this is a property of the index definition -- so you would need to create a different index for each combination of non-searchable fields.

Depending on your scenario, you could also make a field filterable, and filter based on that field. Something like $filer=Freshenss eq 'Really Fresh'. See <a href="https://docs.microsoft.com/en-us/azure/search/search-filters" rel="nofollow">this link</a> for more information on using filters.

thanks! -Luis Cabrera

Answer2:

For "Magnitude", "Freshness", you can set the set the range start as higher value and range end as lower value. Would this be considered as negative impact?

Like this: <a href="https://i.stack.imgur.com/jDTSF.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/jDTSF.png" data-original="https://i.stack.imgur.com/jDTSF.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Answer3:

I resolved that scenario by creating negative values (using an INT field) for the field we wanted to bury. That gave us the negative boost we needed.

I used a similar technique for Date "Freshness" too, where we counted the days from some event and the higher the number the less fresh the date is and used a "magnitude" function for it.

Thanks!

Recommend

  • What is it called when I say “catch (Exception e) {}” in Java?
  • Have a controller send back a response without Content-Type header
  • How to concatenate all results from table row?
  • ASP.NET 2.0 Session Timeout
  • In explicit LINQ-to-SQL (C#) does order matter?
  • How does Skobbler prioritize which POIs to show?
  • Issue when joining serf nodes located in different Docker containers
  • Laravel include causes error: Method Illuminate\\View\\View::__toString() must not throw an exce
  • signer not valid error
  • GRPC and types import error in App Engine Datastore
  • Sum data table columns using linq
  • Count from each distinct date, fill in missing dates with zero
  • Compare struct to a constant in C
  • CodeIgniter URI Parameter is partially bypassing an “if” statement
  • How can I get the choice “H2” back in the H2 consol?
  • NHibernate manually control fetching
  • Wrong labels when plotting a time series pandas dataframe with matplotlib
  • Azure webjobs output logs indexing taking very long
  • Bash if statement with multiple conditions
  • Android application: how to use the camera and grab the image bytes?
  • Automatically associate new Sonar project with custom quality profile and quality gate
  • Is playing sound in Javascript performance heavy?
  • ADO and msqli connections very slow
  • Marklogic : Query response time is very high
  • Sort List of Strings By Version
  • Use of this Javascript
  • How to use remove-erase idiom for removing empty vectors in a vector?
  • Yii2: Config params vs. const/define
  • C++ Partial template specialization - design simplification
  • Ajax Loaded meta Tags
  • Insert into database using onclick function
  • QLineEdit password safety
  • Retrieving value from sql ExecuteScalar()
  • Knitr HTML Loop - Some HTML output, some R output
  • Can a Chrome extension content script make an jQuery AJAX request for an html file that is itself a
  • How to get next/previous record number?
  • Python: how to group similar lists together in a list of lists?
  • KeystoneJS: Relationships in Admin UI not updating
  • Hits per day in Google Big Query
  • Checking variable from a different class in C#