Integrating with nutch/hbase/SOLR to build a search engine 3: content modification

Source: Internet
Author: User


1. Search from the content domain
In solrconfig. xml obtained from SOLR example, QF is defined as follows: [HTML]View plaincopy
  1. <STR name = "QF">
  2. Text ^ 0.5 features ^ 1.0 name ^ 1.2 SKU ^ 1.5 ID ^ 10.0 Manu ^ 1.1 cat ^ 1.4
  3. Title ^ 10.0 description ^ 5.0 keywords ^ 5.0 author ^ 2.0 resourcename ^ 1.0
  4. </STR>
Because content does not take any weight, if a document only contains keywords in content, the search result does not return this document. Therefore, you need to increase the content weight and URL weight (if needed) for the index extracted by nutch ): [HTML]View plaincopy
  1. <STR name = "QF">
  2. Content ^ 1.0 text ^ 0.5 features ^ 1.0 name ^ 1.2 SKU ^ 1.5 ID ^ 10.0 Manu ^ 1.1 cat ^ 1.4
  3. Title ^ 10.0 description ^ 5.0 keywords ^ 5.0 author ^ 2.0 resourcename ^ 1.0
  4. </STR>
2. Save the content of the webpage

In schema. XML

 <field name="content" type="text" stored="false" indexed="true"/>
Change

        <field name="content" type="text" stored="true" indexed="true"/>

3. display both webpage files and general text

Velocity/results_list.vm

##parse("hit_plain.vm")
Remove comments.

4. Adjust the display content of each search return item

VI richtest_doc.vm

<div>  Id: #field('id')</div>
Changed:

<div>  time: #field('tstamp')</div><div>  score: #field('score')</div>
This method can modify other fields, see http://blog.csdn.net/jediael_lu/article/details/38039267

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.