• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Liferay With Apache Lucene

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Rancher
Posts: 43011
76
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Muthukumar Thangavinayagam
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Everybody's invited. Except this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!