How do i implement tag searching with lucene?
Posted
by acidzombie24
on Stack Overflow
See other posts from Stack Overflow
or by acidzombie24
Published on 2010-03-13T10:34:38Z
Indexed on
2010/03/14
15:35 UTC
Read the original article
Hit count: 205
I havent used lucene. Last time i ask (many months ago, maybe a year) people suggested lucene. As am example say there are 3 items tag like this
- apples carrots
- apples
- carrots
- apple banana
if a user search apples i dont care if there is any preference from 1,2 and 4. However i seen many forums do this which i hated is when a user search apple carrots 2 and 3 are get high results while 1 is hard to find even though it matches my search more closely. I HATED this in forums.
Also i would like the ability to do search carrots -apples which will only get me 3. I am not sure what should happen if i search carrots banana but anyways as long as more 2 and 3 results are lower priority then 1 when i search apples carrots i'll be happy.
Can lucene do this? and where do i start? i see a lot of classes and many of them talk about docs. What should i use for tagging?
© Stack Overflow or respective owner