组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
himanshu jain
Lucene search
2012年2月6日 下午11:10
答复

himanshu jain

等级: Junior Member

帖子: 34

加入日期: 2011年10月25日

最近的帖子

How to implement Lucene search in liferay.I implement search but its using the default one like wiki,blogs etc.I am using mysql db nw i want to search the contents from my database.I try with the docs but not able to achieve dis successfully .Can anyone help me from the beginning step till the final result for implementing this solution.
Thanks in Advance
Ram Manusani
RE: Lucene search
2012年2月14日 下午3:24
答复

Ram Manusani

等级: Regular Member

帖子: 124

加入日期: 2011年10月27日

最近的帖子

Liferay by default provides many portlets to support Open Search Framework such as Message Bords, Blogs, Wikis, Directory and Doc. Library, Users, etc.

These portlets have OpenSearch framework Conf. like
<open-search-class>class-name</open-search-class>

Liferay by default sets Lucene to false for faster performance in portal.properties

you should probably change them in portal-ext.properties

index.read.only=false
index.on.startup=false

You probably need to change it to true and change your indexer class to the class name

Example like:
<indexer-class>com. liferay.test.search.Indexer</indexer-class>

This should help you to start with
Nikhil Nishchal
RE: Lucene search
2012年6月21日 下午10:59
答复

Nikhil Nishchal

等级: Junior Member

帖子: 74

加入日期: 2012年6月21日

最近的帖子

Hello Himanshu,
Lucene search is based on indexer search.
Liferay provide us different ways to use lucene search to make fetching result fast.
For our own model we can also create its own indexer if required.

For running liferay indexer model like journalArticle blogs etc.. we can use different Query patter to fetch result in customized way.
We can user query like TermQuery, BolleanQuery etc.
and latter we can get excute those query to search ustil to get Hits.

Hits hits = null;
try {
hits = SearchEngineUtil.search(companyId, yourCustomQuery, startIndex, endIndex);
} catch (SearchException ex) {
LOGGER.error("Error occured during company search", ex);
}

Further you can get document through these hits.

By this way we can achieve as per our required result.
Hitoshi Ozawa
RE: Lucene search
2012年6月25日 上午5:44
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 8000

加入日期: 2010年3月23日

最近的帖子

Shouldn't set index.read.only=true because this will result in lucene not being updated. This setting is usually just used in clustered environment
where all writes are to one server (master-slave setup).
Pranay R Patadiya
RE: Lucene search
2012年7月23日 下午11:51
答复

Pranay R Patadiya

等级: Regular Member

帖子: 173

加入日期: 2010年2月22日

最近的帖子

Hi Himanshu,

Has your search worked?

Thanks,
Pranay