Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
major major
Make web content searchable
18 de Fevereiro de 2013 05:40
Resposta

major major

Ranking: New Member

Mensagens: 13

Data de entrada: 1 de Novembro de 2012

Mensagens recentes

How do I make a web content searchable?
Subhash Pavuskar
RE: Make web content searchable
18 de Fevereiro de 2013 08:53
Resposta

Subhash Pavuskar

Ranking: Regular Member

Mensagens: 234

Data de entrada: 12 de Março de 2012

Mensagens recentes

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.
major major
RE: Make web content searchable
19 de Fevereiro de 2013 01:03
Resposta

major major

Ranking: New Member

Mensagens: 13

Data de entrada: 1 de Novembro de 2012

Mensagens recentes

thanks Subhash.
1. I would like to know how to choose which parts of the content in the web content will be searchable?
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?

2. Does the search query support AND, OR ,NOT, special characters?
Dhvanil Reshamwala
RE: Make web content searchable
19 de Fevereiro de 2013 03:57
Resposta

Dhvanil Reshamwala

Ranking: New Member

Mensagens: 13

Data de entrada: 23 de Dezembro de 2011

Mensagens recentes

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
Jaynil A Bagdai
RE: Make web content searchable
23 de Fevereiro de 2013 05:45
Resposta

Jaynil A Bagdai

Ranking: Regular Member

Mensagens: 120

Data de entrada: 3 de Março de 2012

Mensagens recentes

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.