Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
himanshu jain
Lucene search
6. Februar 2012 23:10
Antwort

himanshu jain

Rang: Junior Member

Nachrichten: 34

Eintrittsdatum: 25. Oktober 2011

Neue Beiträge

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
14. Februar 2012 15:24
Antwort

Ram Manusani

Rang: Regular Member

Nachrichten: 124

Eintrittsdatum: 27. Oktober 2011

Neue Beiträge

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
21. Juni 2012 22:59
Antwort

Nikhil Nishchal

Rang: Regular Member

Nachrichten: 136

Eintrittsdatum: 21. Juni 2012

Neue Beiträge

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
25. Juni 2012 05:44
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7949

Eintrittsdatum: 23. März 2010

Neue Beiträge

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
23. Juli 2012 23:51
Antwort

Pranay R Patadiya

Rang: Regular Member

Nachrichten: 181

Eintrittsdatum: 22. Februar 2010

Neue Beiträge

Hi Himanshu,

Has your search worked?

Thanks,
Pranay