This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Liferay With Apache Lucene Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply 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: 35249
    
    7
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.


Android appsImageJ pluginsJava web charts
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: 35249
    
    7
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

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Liferay With Apache Lucene
 
Similar Threads
Help Needed for Developping portals
apache lucene
Hibernate Search in Action
SSLHandshake exception [ PLEASE HELP]
Lucene: Arabic search issue (UTF-8)