Fórumok

Make web content searchable

thumbnail
major major, módosítva 11 év-val korábban

Make web content searchable

New Member Bejegyzések: 13 Csatlakozás dátuma: 2012.11.01. Legújabb bejegyzések
How do I make a web content searchable?
thumbnail
Subhash Pavuskar, módosítva 11 év-val korábban

RE: Make web content searchable

Regular Member Bejegyzések: 234 Csatlakozás dátuma: 2012.03.13. Legújabb bejegyzések
Hi,

To add search in theme:

1. Open file [LIFRAY_SDK]/themes/{theme-name}/docroot/_diffs/templates/portal_normal.vm

2. Add $theme.search() at your desired location.

3. Build and deploy the theme.

4. A search text box will appear where the code was placed


To Customize the search:

1. Open file [LIFERAY_HOME]/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/portal-ext.properties

2. Add following lines:

com.liferay.portlet.blogs.util.BlogsOpenSearchImpl=true

com.liferay.portlet.bookmarks.util.BookmarksOpenSearchImpl=true

com.liferay.portlet.calendar.util.CalendarOpenSearchImpl=true

com.liferay.portlet.directory.util.DirectoryOpenSearchImpl=true

com.liferay.portlet.documentlibrary.util.DLOpenSearchImpl=true

com.liferay.portlet.imagegallery.util.IGOpenSearchImpl=true

com.liferay.portlet.journal.util.JournalOpenSearchImpl=true

com.liferay.portlet.messageboards.util.MBOpenSearchImpl=true

com.liferay.portlet.wiki.util.WikiOpenSearchImpl=true

3. Change values to “false” for those you do not want to include in search result.

For example, to search only “Web Content”, leave “com.liferay.portlet.journal.util.JournalOpenSearchImpl” to “true” and make other values to false.
thumbnail
major major, módosítva 11 év-val korábban

RE: Make web content searchable

New Member Bejegyzések: 13 Csatlakozás dátuma: 2012.11.01. Legújabb bejegyzések
thanks Subhash.
1. I would like to know how to choose which parts of the content in the web content will be searchable?
[indent] I guess I need to do the following:
A. In a web content edit screen there is a field which name is:"Tags"
B. In a structure edit screen there is a select box for each field which has values: Searchable - Keyword , Searchable - Text
Is there additional settings to config?[/indent]

2. Does the search query support AND, OR ,NOT, special characters?
Dhvanil Reshamwala, módosítva 11 év-val korábban

RE: Make web content searchable (Válasz)

New Member Bejegyzések: 13 Csatlakozás dátuma: 2011.12.23. Legújabb bejegyzések
Hi,
By default web content is searchable. You will not require to do any setting in portal-ext.properties.

1) All the fields marked as searchable in the structure can be searched. Tag search will display the webcontent is user searches that particular tag contents.
2) Internally Liferay uses Lucene to search for the items. So you should be able to use AND, OR and other items as per Lucene syntax.

Thanks,
Dhvanil
thumbnail
Jaynil A Bagdai, módosítva 11 év-val korábban

RE: Make web content searchable

Regular Member Bejegyzések: 119 Csatlakozás dátuma: 2012.03.03. Legújabb bejegyzések
Hi Major,

When you create web content, you will see a checkbox over there named "Searchable", if you select that it will automatically become searchable no extra configurations needed.