Foros de discusión

Make web content searchable

thumbnail
major major, modificado hace 11 años.

Make web content searchable

New Member Mensajes: 13 Fecha de incorporación: 1/11/12 Mensajes recientes
How do I make a web content searchable?
thumbnail
Subhash Pavuskar, modificado hace 11 años.

RE: Make web content searchable

Regular Member Mensajes: 234 Fecha de incorporación: 13/03/12 Mensajes recientes
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, modificado hace 11 años.

RE: Make web content searchable

New Member Mensajes: 13 Fecha de incorporación: 1/11/12 Mensajes recientes
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, modificado hace 11 años.

RE: Make web content searchable (Respuesta)

New Member Mensajes: 13 Fecha de incorporación: 23/12/11 Mensajes recientes
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, modificado hace 11 años.

RE: Make web content searchable

Regular Member Mensajes: 119 Fecha de incorporación: 3/03/12 Mensajes recientes
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.