SOLR features three: sorting based on SOLR customized reference

Source: Internet
Author: User
Tags solr

The order implementation has n forms, the lowest cost, the fastest response time is the target
An index that supports n sort strategies and is considered for non-interference on-line
Each implementation, the processing of the scene is different, not the same 020 sort, from the index to the effect, there are many pits, this article is not elaborate, because some content is not good public several basic concept review
(1) Sorting customization differs from implementing business sequencing.
Business sequencing can be a check-in phase, with boost, various func combinations, offline score, and other individual or combination to achieve the sorting target,
Or field boost, document boost in the index build phase
or the processing of postion, freq, length, etc. in the index construction phase
or interfere with VSM,
or implement your own function,
or custom queryparser to introduce custom query and related weight, score, etc.
Or customize the querycomponent and then completely adjust the query and sort from the query link
Or a combination of the above

(2) Sorting customization
This refers specifically to the sort mechanism that SOLR has defaulted on, default VSM, default Sortbyfield, default function collection including their combinations,
The default booleanquery, Phrasequery, Luceneparser, Dismax parser, and so on, cannot meet the ordering requirements.
Then you need to unveil and introduce your own sort.

(3) sequencing is a dynamic process
Absolutely not once set, permanently valid. With changes in the data set, changes in business scenarios, changes in the market, and other factors, sequencing is only a stage
Meet business needs. This means that the sort is uninterrupted process, no best, only better.

(4) sort is one doc a score just
This is said to obtain the doc, to obtain the doc's score, Doc's score only related to the doc itself content. Indirectly, each doc's score is self-closing, regardless of the score of other doc.

several effective and low cost implementations of ordering customization based on SOLR
(1) Simple, direct Extendsvaluesourceparser
Configuring your own Valuesourceparser in Solrconfig.xml, the query node calls the related sort by the keyword corresponding to the name.
Scopes are set in the query and are enabled when needed
EG configuration

Inquire
Query.add ("Sort", "Sortrank ([email protected]) ASC");

(2) The parameter adjustment of VSM BM25 extends similarityfactory{
Configured in Schema.xml, the scope is the entire solrcore.

(3) searchcomponent rewrite extends searchcomponent
This can be achieved by the default sorting +topn two times, or directly define their own sort
The implementation inside of this is the depth of the intervention query link, or even the cache.
Here the intervention design to the Shard request requires careful verification
Some of the interventions here require parser intervention, which is used to parse the parameters
About the personalized ordering, recommended to go this mode

(4) About personalized sorting
Schema configuration: distance algorithm, distance accuracy
Sorting strategy: Filter First or result priority or speed priority, then there will be different angles of balance
Involves specific business details and sequencing formulas, where 1w words are omitted

SOLR features three: sorting based on SOLR customized reference

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.