Optimize search by adding stop words

Issue

You want to implement a stop word list to optimize your search index. In this case, the use of the full-text Lucene handler to index /content is assumed. If you are using a standard search index, then use the appropriate configuration files accordingly.

Solution

  1. Connect to your instance via CQDE
  2. Open page /config/repository/search/fulltexthandler.xml. By default, it looks like the following:
    <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE searchhandler SYSTEM "cq:/system/resources/dtd/contentbus/search/fulltexthandler.dtd"> <searchhandler> <index location="search/fulltext" maxFieldLength="10000" resultCacheSize="50" useCompoundFile="true" /> </searchhandler>
  3. Add your stop words to this file like the following:
    <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE searchhandler SYSTEM "cq:/system/resources/dtd/contentbus/search/fulltexthandler.dtd"> <searchhandler> <index location="search/fulltext" maxFieldLength="10000" resultCacheSize="50" useCompoundFile="true" /> <stop-list> <stop-word>and</stop-word> <stop-word>or</stop-word> </stop-list> </searchhandler>
  4. You can use the zip file attached as the list of stop words, generate your own list, or find another stop word list from Internet.
  5. Save /config/repository/search/fulltexthandler.xml.
  6. Stop your instance.
  7. Delete folder cq_home/data/your_instance/search/fulltext.
  8. Start your instance.

Lejupielādēt

Piezīme.

Restart can take some time depending on your content size, since Lucene reindexes the content.

 Adobe

Saņemiet palīdzību ātrāk un vienkāršāk

Jauns lietotājs?

Adobe MAX 2024

Adobe MAX
Radošuma konference

14.–16. oktobris Maiami pludmalē un tiešsaistē

Adobe MAX

Radošuma konference

14.–16. oktobris Maiami pludmalē un tiešsaistē

Adobe MAX 2024

Adobe MAX
Radošuma konference

14.–16. oktobris Maiami pludmalē un tiešsaistē

Adobe MAX

Radošuma konference

14.–16. oktobris Maiami pludmalē un tiešsaistē