You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by laszlo sera <la...@gmail.com> on 2006/07/25 17:37:11 UTC

Article keyword counters

Hi all,

I need some help from the Lucene experts because I coulnd't find the
best solution for a problem...

The problem: we have article entities which can have multiple keywords:

- article #1: keyword #1, keyword#2, keyword#3
- article #2: keyword#2, keyword#3
- article #3: keyword#3
- article #4: keyword#4

I need to create a method to produce a list like this for keyword #2:

- keyword#1 (1)
- keyword#2 (2)
- keyword#3 (1)
- keyword#2 (0)

This list shows counters of keywords and a counter means that how many
article matches with the given keyword in the given scope (in this
example: keyword#2). So, there's one article which has keyword#1 and
keyword#2.

What's the best way to produce the counters?

Laci

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Article keyword counters

Posted by laszlo sera <la...@gmail.com>.
Hi Chris,

Sorry for the cross posting but i'm newbie at the lucene community and
thanks for your instructions!

> if you want to know the counts in the context of a search that has
> narrowed the document space, the problem becomes trickier -- you'll find
> discussions on it if you search the archives for "faceted search"
> "category counts" of "facet counts"

Yes, this is the situation and I try to find the answer in the archive.

Laci

On 7/25/06, Chris Hostetter <ho...@fucit.org> wrote:
>
> 1) please do not cross post to more then one lucene mailing list.  the
> appropraites place for questions about using the Java Lucene library is
> "java-user"
>
> 2) if you want the counts of all documents matching each keyword, then the
> TermEnum.docFreq method can solve all of your problems.
>
> if you want to know the counts in the context of a search that has
> narrowed the document space, the problem becomes trickier -- you'll find
> discussions on it if you search the archives for "faceted search"
> "category counts" of "facet counts"
>
>
>
> : Date: Tue, 25 Jul 2006 17:37:11 +0200
> : From: laszlo sera <la...@gmail.com>
> : Reply-To: java-user@lucene.apache.org
> : To: java-user@lucene.apache.org
> : Subject: Article keyword counters
> :
> : Hi all,
> :
> : I need some help from the Lucene experts because I coulnd't find the
> : best solution for a problem...
> :
> : The problem: we have article entities which can have multiple keywords:
> :
> : - article #1: keyword #1, keyword#2, keyword#3
> : - article #2: keyword#2, keyword#3
> : - article #3: keyword#3
> : - article #4: keyword#4
> :
> : I need to create a method to produce a list like this for keyword #2:
> :
> : - keyword#1 (1)
> : - keyword#2 (2)
> : - keyword#3 (1)
> : - keyword#2 (0)
> :
> : This list shows counters of keywords and a counter means that how many
> : article matches with the given keyword in the given scope (in this
> : example: keyword#2). So, there's one article which has keyword#1 and
> : keyword#2.
> :
> : What's the best way to produce the counters?
> :
> : Laci
> :
> : ---------------------------------------------------------------------
> : To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> : For additional commands, e-mail: java-user-help@lucene.apache.org
> :
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Article keyword counters

Posted by Chris Hostetter <ho...@fucit.org>.
1) please do not cross post to more then one lucene mailing list.  the
appropraites place for questions about using the Java Lucene library is
"java-user"

2) if you want the counts of all documents matching each keyword, then the
TermEnum.docFreq method can solve all of your problems.

if you want to know the counts in the context of a search that has
narrowed the document space, the problem becomes trickier -- you'll find
discussions on it if you search the archives for "faceted search"
"category counts" of "facet counts"



: Date: Tue, 25 Jul 2006 17:37:11 +0200
: From: laszlo sera <la...@gmail.com>
: Reply-To: java-user@lucene.apache.org
: To: java-user@lucene.apache.org
: Subject: Article keyword counters
:
: Hi all,
:
: I need some help from the Lucene experts because I coulnd't find the
: best solution for a problem...
:
: The problem: we have article entities which can have multiple keywords:
:
: - article #1: keyword #1, keyword#2, keyword#3
: - article #2: keyword#2, keyword#3
: - article #3: keyword#3
: - article #4: keyword#4
:
: I need to create a method to produce a list like this for keyword #2:
:
: - keyword#1 (1)
: - keyword#2 (2)
: - keyword#3 (1)
: - keyword#2 (0)
:
: This list shows counters of keywords and a counter means that how many
: article matches with the given keyword in the given scope (in this
: example: keyword#2). So, there's one article which has keyword#1 and
: keyword#2.
:
: What's the best way to produce the counters?
:
: Laci
:
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
: For additional commands, e-mail: java-user-help@lucene.apache.org
:



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Article keyword counters

Posted by Alessandra Marrelli <am...@thematica.it>.
unaiu capitu?

----- Original Message ----- 
From: "Wolfgang Täger" <wt...@epo.org>
To: <ge...@lucene.apache.org>
Sent: Wednesday, July 26, 2006 11:33 AM
Subject: Re: Article keyword counters


> Hi Laci,
>
> You may just search for key 2 and then use a FilteredQuery.
>
> Regards,
>
>        Wolfgang
>
>
>
>
>
>
> "laszlo sera" <la...@gmail.com>
> 25-07-2006 17:38
> Please respond to
> general@lucene.apache.org
>
>
> To
> general@lucene.apache.org
> cc
>
> Subject
> Article keyword counters
>
>
>
>
>
>
> Hi all,
>
> I need some help from the Lucene experts because I coulnd't find the
> best solution for a problem...
>
> The problem: we have article entities which can have multiple keywords:
>
> - article #1: keyword #1, keyword#2, keyword#3
> - article #2: keyword#2, keyword#3
> - article #3: keyword#3
> - article #4: keyword#4
>
> I need to create a method to produce a list like this for keyword #2:
>
> - keyword#1 (1)
> - keyword#2 (2)
> - keyword#3 (1)
> - keyword#2 (0)
>
> This list shows counters of keywords and a counter means that how many
> article matches with the given keyword in the given scope (in this
> example: keyword#2). So, there's one article which has keyword#1 and
> keyword#2.
>
> What's the best way to produce the counters?
>
> Laci
>
>


--------------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/399 - Release Date: 25/07/2006


Re: Searching On Image...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
imgSeek is one I have bookmarked that looks slick: http:// 
www.imgseek.net/

There is another system similar to this with an online demo, but I'm  
not sure what its URL or name is off the top of my head, sorry.

Lucene could be at the heart of such a system, but it would require  
codifying images textually somehow.

	Erik



On Jul 31, 2006, at 5:07 AM, Naveen kumar srikakolanu wrote:

> Firstly I am very much thankful to your response...
>
> Can Lucene Index and Search the images in a directory like how the  
> text
> (content) of a file is indexed, stored and retrieved (searched)?
>
> Suppose I am having some images in a directory if I index that  
> directory and
> whenever I gave a sample image so that the search retrieves the  
> images which
> suit the given (input) image on the attributes like color, shape  
> and other
> features of an image.
>
> For ex: I am storing the images of chemical structures if any time  
> I want to
> retrieve the images which suits on the basis of a sample image like  
> its
> size, shape, coordinates of the image etc. can we do this using  
> Lucene? If
> so please let me know or else please let me know the different  
> approaches to
> do so.
> 	
> 	Waiting for your reply...
>
> Thanks in advance,
> S. Naveen.
>
> -----Original Message-----
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Sent: Monday, July 31, 2006 1:57 PM
> To: general@lucene.apache.org
> Subject: Re: Searching On Image...
>
> please elaborate.   what do you want to search about an image?
>
> lucene is generic - toss text at it and then search for that text.
> that text could easily be keywords and other metadata associated with
> an image with a pointer (URL, file path, etc) to the image itself.
>
> 	erik
>
> On Jul 31, 2006, at 1:12 AM, Naveen kumar srikakolanu wrote:
>
>> Hi,
>>
>> 	Is there any way to search an image by Lucene.
>> 	How can we search the image.
>> Thanks in advance,
>> S. Naveen.
>>
>>
>>
>>
>
>
>
>


RE: Searching On Image...

Posted by Naveen kumar srikakolanu <na...@exensys.com>.
Firstly I am very much thankful to your response...

Can Lucene Index and Search the images in a directory like how the text
(content) of a file is indexed, stored and retrieved (searched)?

Suppose I am having some images in a directory if I index that directory and
whenever I gave a sample image so that the search retrieves the images which
suit the given (input) image on the attributes like color, shape and other
features of an image.

For ex: I am storing the images of chemical structures if any time I want to
retrieve the images which suits on the basis of a sample image like its
size, shape, coordinates of the image etc. can we do this using Lucene? If
so please let me know or else please let me know the different approaches to
do so.
	
	Waiting for your reply...

Thanks in advance,
S. Naveen.

-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com] 
Sent: Monday, July 31, 2006 1:57 PM
To: general@lucene.apache.org
Subject: Re: Searching On Image...

please elaborate.   what do you want to search about an image?

lucene is generic - toss text at it and then search for that text.   
that text could easily be keywords and other metadata associated with  
an image with a pointer (URL, file path, etc) to the image itself.

	erik

On Jul 31, 2006, at 1:12 AM, Naveen kumar srikakolanu wrote:

> Hi,
>
> 	Is there any way to search an image by Lucene.
> 	How can we search the image.
> Thanks in advance,
> S. Naveen.
>
>
>
>






Re: Searching On Image...

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Actually, look at the Lucene group on Simpy - http://www.simpy.com/group/363 - there is an application or two there that deal with image searching and use Lucene, if I recall correctly.

Otis

----- Original Message ----
From: Erik Hatcher <er...@ehatchersolutions.com>
To: general@lucene.apache.org
Sent: Monday, July 31, 2006 4:26:52 AM
Subject: Re: Searching On Image...

please elaborate.   what do you want to search about an image?

lucene is generic - toss text at it and then search for that text.   
that text could easily be keywords and other metadata associated with  
an image with a pointer (URL, file path, etc) to the image itself.

    erik

On Jul 31, 2006, at 1:12 AM, Naveen kumar srikakolanu wrote:

> Hi,
>
>     Is there any way to search an image by Lucene.
>     How can we search the image.
> Thanks in advance,
> S. Naveen.
>
>
>
>





Re: Searching On Image...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
please elaborate.   what do you want to search about an image?

lucene is generic - toss text at it and then search for that text.   
that text could easily be keywords and other metadata associated with  
an image with a pointer (URL, file path, etc) to the image itself.

	erik

On Jul 31, 2006, at 1:12 AM, Naveen kumar srikakolanu wrote:

> Hi,
>
> 	Is there any way to search an image by Lucene.
> 	How can we search the image.
> Thanks in advance,
> S. Naveen.
>
>
>
>


Searching On Image...

Posted by Naveen kumar srikakolanu <na...@exensys.com>.
Hi,

	Is there any way to search an image by Lucene.
	How can we search the image.
Thanks in advance,
S. Naveen.






Re: Article keyword counters

Posted by Wolfgang Täger <wt...@epo.org>.
Hi Laci,

You may just search for key 2 and then use a FilteredQuery.

Regards,

        Wolfgang 

 
 



"laszlo sera" <la...@gmail.com> 
25-07-2006 17:38
Please respond to
general@lucene.apache.org


To
general@lucene.apache.org
cc

Subject
Article keyword counters






Hi all,

I need some help from the Lucene experts because I coulnd't find the
best solution for a problem...

The problem: we have article entities which can have multiple keywords:

- article #1: keyword #1, keyword#2, keyword#3
- article #2: keyword#2, keyword#3
- article #3: keyword#3
- article #4: keyword#4

I need to create a method to produce a list like this for keyword #2:

- keyword#1 (1)
- keyword#2 (2)
- keyword#3 (1)
- keyword#2 (0)

This list shows counters of keywords and a counter means that how many
article matches with the given keyword in the given scope (in this
example: keyword#2). So, there's one article which has keyword#1 and
keyword#2.

What's the best way to produce the counters?

Laci


Article keyword counters

Posted by laszlo sera <la...@gmail.com>.
Hi all,

I need some help from the Lucene experts because I coulnd't find the
best solution for a problem...

The problem: we have article entities which can have multiple keywords:

- article #1: keyword #1, keyword#2, keyword#3
- article #2: keyword#2, keyword#3
- article #3: keyword#3
- article #4: keyword#4

I need to create a method to produce a list like this for keyword #2:

- keyword#1 (1)
- keyword#2 (2)
- keyword#3 (1)
- keyword#2 (0)

This list shows counters of keywords and a counter means that how many
article matches with the given keyword in the given scope (in this
example: keyword#2). So, there's one article which has keyword#1 and
keyword#2.

What's the best way to produce the counters?

Laci