Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 834 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Boosting search in specific fields and sorting by rank

#1
I have the following query:

{
"sort": [
{"actual_rank" : "desc"}
],
"query": {
"multi_match" : {
"query" : term,
"fields" : [ "title^3" , "category^5" , "entities.name^5"]
}
}
}

The problem with this query is that the sorting by rank makes the specified fields boosting pretty irrelevant(a best ranked item in which the term doesn't appear in the specified fields will be higher placed than a worst ranked item in which the term appears).

I'd like to decrease the importance of the sorting to get better results.

Reply

#2
Actually, according to the sorting docs (

[To see links please register here]

), you need to enable the `track_scores` setting if you want scores to be calculated at all when sorting on a field.

However, I'm guessing you want to do some custom scoring (see

[To see links please register here]

and/or

[To see links please register here]

). <s>Examples of those are excellent in this blog post (

[To see links please register here]

)

I'd post code, but I think the blog post provides a thorough view.</s>
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through