aspose file tools*
The moose likes Other Open Source Projects and the fly likes Liferay With Apache Lucene Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Liferay With Apache Lucene" Watch "Liferay With Apache Lucene" New topic
Author

Liferay With Apache Lucene

Muthukumar Thangavinayagam
Greenhorn

Joined: Nov 15, 2007
Posts: 7
Hi All,

I'm working on Liferay with Apache Lucene . i have some problem with Lucene query.

I indexed some table in Liferay . That contain list like

Hello
Sample Hello
Sample Hello
Sample Hello
Hello

I written BooleanQuery for searching "Hello" value . but it returns all Hello values including "Sample Hello" also return in result .

My Question is how to get extract "Hello" value from lucene index.


With Best Regards,
Muthukumar. T

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
While there may be an unusual way that Lucene and Liferay could cooperate, this sounds like the normal way Lucene would work. If you add "jambalaya hello bucksfizz" to an index, then that matches "hello".

Lucene does not have boundary matching (although that may be coming), but you can simulate it as suggested here.


Ping & DNS - updated with new look and Ping home screen widget
Muthukumar Thangavinayagam
Greenhorn

Joined: Nov 15, 2007
Posts: 7
Ulf Dittmer wrote:While there may be an unusual way that Lucene and Liferay could cooperate, this sounds like the normal way Lucene would work. If you add "jambalaya hello bucksfizz" to an index, then that matches "hello".

Lucene does not have boundary matching (although that may be coming), but you can simulate it as suggested here.


Thank you Ulf Dittmer ,

If you find any other solution please reply.

Thankx ,
Muthukumar
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
If you find any other solution please reply.

Well, I'm not looking for one, so that's unlikely :-) If the one I suggested is not suitable for your purposes then you should elaborate on why that is.
Muthukumar Thangavinayagam
Greenhorn

Joined: Nov 15, 2007
Posts: 7
Hi

I got solution for my problem . For index the values "Hello" and "Sample Hello"

indexing the field like "_Begin"+fieldName+"_End" .

Index in lucene it look like "_BeginHello_End" and "_BeginSample Hello_End" and use search same procedure "_Begin"+fieldName+"_End" .


Thanks ,

Muthukumar Thangavinayagam

 
jQuery in Action, 2nd edition
 
subject: Liferay With Apache Lucene
 
Similar Threads
apache lucene
Hibernate Search in Action
Help Needed for Developping portals
SSLHandshake exception [ PLEASE HELP]
Lucene: Arabic search issue (UTF-8)