Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Question

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


kjysmu at gmail

Jun 26, 2012, 9:21 PM

Post #1 of 2 (137 views)
Permalink
Question

I'm beginner of Lucene.

I have one big size txt file containing image id + its tag list (some
containing foreign characters - anyway only tag written in English will be
used for my application ).

e.g.)

11111 fruit banana food house boy
11423 car red large bmw

........

(it contains almost 200000 image id, and its taglists)

What i want with lucene is that i wanna get it's image ids for certain query
(tag)
For example, if i send query as a "car", i wanna get all the image id that
contains "car" in its tag list.

how can i implement it using Lucene with Java?

Somebody who can deal with it, plz help me.
Thanks.

--
View this message in context: http://lucene.472066.n3.nabble.com/Question-tp3991482.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


ian.lea at gmail

Jun 27, 2012, 2:18 AM

Post #2 of 2 (133 views)
Permalink
Re: Question [In reply to]

Add imageid as a stored field, no need to index it unless you want to
be able to search by it.

Add the tags as an analyzed indexed field. no need to store unless you
want to read/display the values. StandardAnalyzer will work fine.

Then use QueryParser to build a query like "tags: car", execute the
search and read the values of imageid for all hits.


You might be better off using Solr. Google "lucene getting started"
for more info on, ummm, getting started with lucene. Or buy and read
Lucene In Action, 2nd, edition.



--
Ian.


On Wed, Jun 27, 2012 at 5:21 AM, kjysmu <kjysmu [at] gmail> wrote:
> I'm beginner of Lucene.
>
> I have one big size txt file containing image id + its tag list (some
> containing foreign characters - anyway only tag written in English will be
> used for my application ).
>
> e.g.)
>
> 11111      fruit banana food house boy
> 11423      car red large bmw
>
> ........
>
> (it contains almost 200000 image id, and its taglists)
>
> What i want with lucene is that i wanna get it's image ids for certain query
> (tag)
> For example, if i send query as a "car", i wanna get all the image id that
> contains "car" in its tag list.
>
> how can i implement it using Lucene with Java?
>
> Somebody who can deal with it, plz help me.
> Thanks.
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Question-tp3991482.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.