lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Question
Date Wed, 27 Jun 2012 09:18:16 GMT
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@gmail.com> 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@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


Mime
View raw message